From: Steve Sutton Date: Fri, 18 Mar 2016 14:08:11 +0000 (-0400) Subject: Adding php code comments X-Git-Tag: v1.0.0^2~162^2~9 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=48fb873871eb785e366050556cf22b71f2cf35c7;p=WP-Plugins%2Fglm-member-db-events.git Adding php code comments Using PHPDOC format --- diff --git a/models/front/events/baseAction.php b/models/front/events/baseAction.php index 7745527..d717b0e 100644 --- a/models/front/events/baseAction.php +++ b/models/front/events/baseAction.php @@ -43,12 +43,31 @@ abstract class GlmMembersFront_events_baseAction extends GlmDataEvents parent::__construct(false, false); } + /** + * getCategories + * + * Grab all of the categories for the events + * + * @access public + * @return array categories + */ public function getCategories() { $categoryData = new GlmDataEventsCategories( $this->wpdb, $this->config ); return $categoryData->getCategoriesWithCurrentEvents(); } + /** + * getModelEventsData + * + * Return the array of events. + * + * @param bool $categoryId Id of the category for filtering events (optional) + * @param bool $limit Number of events to return (optional) + * + * @access public + * @return array events + */ public function getModelEventsData($categoryId = null, $limit = null) { $this->postAddTimes = true; @@ -87,6 +106,16 @@ abstract class GlmMembersFront_events_baseAction extends GlmDataEvents return $events; } + /** + * getModelEventData + * + * Return the event using given eventId + * + * @param mixed $eventId Event Id for the entry + * + * @access public + * @return array The event + */ public function getModelEventData($eventId) { //echo '
$eventId: ' . print_r($eventId, true) . '
';