created the model files, view files, shortcodes and actions to hook up the registrationSummary
and accountSummary parts of the front end. Tested that the files are hooked up properly by echoing
a string
--- /dev/null
+<?php
+ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataAccount.php';
+ class GlmMembersFront_registrations_registrationAccountSummary extends GlmDataRegistrationsAccount {
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+
+ public function modelAction($actionData = false)
+ {
+
+
+ // Get any provided option
+ if (isset($_REQUEST['option'])) {
+ $option = $_REQUEST['option'];
+ }
+
+ // Get account ID if supplied
+ if (isset($_REQUEST['account'])) {
+
+ // Make sure it's numeric
+ $this->accountID = ($_REQUEST['account'] - 0);
+
+ if ($this->accountID <= 0) {
+ $this->accountID = false;
+ }
+
+ }
+
+ $view = 'registrationAccountSummary';
+
+ switch ( $option ) {
+
+ }
+
+ // Compile template data
+ $templateData = array(
+
+ );
+ // Return status, any suggested view, and any data to controller
+ return array(
+ 'status' => true,
+ 'modelRedirect' => false,
+ 'view' => 'front/registrations/' . $view . '.html',
+ 'data' => $templateData
+ );
+
+ }
+ }
--- /dev/null
+<?php
+ require_once GLM_MEMBERS_REGISTRATIONS_PLUGIN_CLASS_PATH.'/data/dataRegEvent.php';
+
+ class GlmMembersFront_registrations_registrationSummary extends GlmDataRegistrationsRegEvent {
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+
+ public function modelAction($actionData = false)
+ {
+
+ // Get any provided option
+ if (isset($_REQUEST['option'])) {
+ $option = $_REQUEST['option'];
+ }
+
+ // Get account ID if supplied
+ if (isset($_REQUEST['account'])) {
+
+ // Make sure it's numeric
+ $this->accountID = ($_REQUEST['account'] - 0);
+
+ if ($this->accountID <= 0) {
+ $this->accountID = false;
+ }
+ }
+
+ $view = 'registrationSummary';
+
+ switch ( $option ) {
+
+ }
+
+ // Compile template data
+ $templateData = array(
+
+ );
+ // Return status, any suggested view, and any data to controller
+ return array(
+ 'status' => true,
+ 'modelRedirect' => false,
+ 'view' => 'front/registrations/' . $view . '.html',
+ 'data' => $templateData
+ );
+
+ }
+ }
*/
$glmMembersRegistrationsShortcodes = array(
+ 'glm-registration-summary' => array(
+ 'plugin' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+ 'menu' => 'registrations',
+ 'action' => 'registrationSummary',
+ 'table' => false,
+ 'attributes' => array(
+ 'id' => false,
+ 'member_only' => false,
+ )
+ ),
+ 'glm-registration-account-summary' => array(
+ 'plugin' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+ 'menu' => 'registrations',
+ 'action' => 'registrationAccountSummary',
+ 'table' => false,
+ 'attributes' => array(
+ 'id' => false,
+ 'member_only' => false,
+ )
+ ),
);
$glmMembersRegistrationsShortcodesDescription = '';
),
),
'frontActions' => array(
- )
+ 'registrations' => array(
+ 'registrationSummary' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+ 'registrationAccountSummary' => GLM_MEMBERS_REGISTRATIONS_PLUGIN_SLUG,
+ )
+ ),
);
?>