From fe0966201523020263f7e1f1fbdac4983e8f6ecf Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 14 Dec 2017 16:41:24 -0500 Subject: [PATCH] New code comments. Commenting more of the code for notification types. --- models/admin/settings/notificationTypes.php | 35 +++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/models/admin/settings/notificationTypes.php b/models/admin/settings/notificationTypes.php index 6dc403d..bd362b3 100644 --- a/models/admin/settings/notificationTypes.php +++ b/models/admin/settings/notificationTypes.php @@ -144,6 +144,13 @@ class GlmMembersAdmin_settings_notificationTypes extends GlmDataNotificationType switch( $option ) { case 'test': + /** + * test: + * + * Test the notification email. + * Currently this is just using a hard coded account id of 1. + * After the test it will call wp_die + */ echo '
$_REQUEST: ' . print_r( $_REQUEST, true ) . '
'; require_once GLM_MEMBERS_BILLING_PLUGIN_CLASS_PATH . '/notifications.php'; $Notifications = new GlmNotifications( $this->wpdb, $this->config ); @@ -156,12 +163,24 @@ class GlmMembersAdmin_settings_notificationTypes extends GlmDataNotificationType } wp_die('Testing here'); break; + case 'add': + /** + * add: + * + * This calls the dataabstract newEntry method and sets up the + * edit for for creating a new notification_type. + */ $notification = $this->newEntry(); $view = 'editNotificationType'; break; case 'insert': + /** + * insert: + * + * Calls the insertEntry method that stores the actual data for the data abstract class. + */ $view = 'editNotificationType'; $notification = $this->insertEntry(); if ( $notification['status'] ) { @@ -174,11 +193,21 @@ class GlmMembersAdmin_settings_notificationTypes extends GlmDataNotificationType break; case 'edit': + /** + * edit: + * + * Calls the editEntry method to setup the edit form for this record by id. + */ $notification = $this->editEntry( $id ); $view = 'editNotificationType'; break; case 'update': + /** + * update: + * + * Calls the updateEntry method for the data abstract to save the edit data. + */ if ($id > 0) { $notification = $this->updateEntry($id); if ( $notification['status'] ) { @@ -193,6 +222,12 @@ class GlmMembersAdmin_settings_notificationTypes extends GlmDataNotificationType break; case 'delete': + /** + * delete: + * + * Calls the delete entry method of the dataabstract class. + * To delete the given entry by id. + */ if ($id > 0) { $this->deleteEntry($id, true); } -- 2.17.1