Cheetah
|
Public Member Functions | |
__construct ($iYear, $iMonth) | |
_getWeekNames ($isMiniMode=false) | |
_getCalendarGrid (&$aCalendarGrid) | |
_getCalendar () | |
getTitle () | |
getData () | |
getUnit (&$aData) | |
getBaseUri () | |
getBrowseUri () | |
getEntriesNames () | |
getMonthUrl ($isNextMoths, $isMiniMode=false) | |
Public Attributes | |
$iYear | |
$iMonth | |
$iPrevYear | |
$iPrevMonth | |
$iNextYear | |
$iNextMonth | |
$iFirstWeekDay | |
$iNumDaysInMonth | |
$sMonthName | |
$iWeekStart | |
$iWeekEnd | |
This work, "Cheetah - https://www.cheetahwsb.com", is a derivative of "Dolphin Pro V7.4.2" by BoonEx Pty Limited - https://www.boonex.com/, used under CC-BY. "Cheetah" is licensed under CC-BY by Dean J. Bassett Jr. CC-BY License - http://creativecommons.org/licenses/by/3.0/ Calendar for your module content
Related classes: ChBaseCalendar - calendar base representation ChTemplCalendar - custom template representation
To add calendar to your content you need to inherit this class and override the following methids: getEntriesNames () getData () getBaseUri () getBrowseUri ()
see each function documentation for more information.
Example of usage: After overriding this class and adding necessary methods use thje following code to disp;lay calendar: This code is called from module class:
function actionCalendar ($iYear = '', $iMonth = '') { ch_import ('Calendar', $this->_aModule); $oCalendar = ch_instance ($this->_aModule['class_prefix'] . 'Calendar', array ($iYear, $iMonth, $this->_oDb, $this->_oTemplate, $this->_oConfig)); echo $oCalendar->display(); }
Memberships/ACL: vote - ACTION_ID_VOTE
Alerts: this class don't risa any alert
Definition at line 48 of file ChWsbCalendar.php.
ChWsbCalendar::__construct | ( | $iYear, | |
$iMonth | |||
) |
Reimplemented in ChTemplCalendar, ChTemplCalendar, ChTemplCalendar, ChBaseCalendar, TagsCalendar, ChWsbProfilesCalendar, and CategoriesCalendar.
Definition at line 53 of file ChWsbCalendar.php.
ChWsbCalendar::_getCalendar | ( | ) |
Reimplemented in TagsCalendar, and CategoriesCalendar.
Definition at line 145 of file ChWsbCalendar.php.
ChWsbCalendar::_getCalendarGrid | ( | & | $aCalendarGrid | ) |
Definition at line 119 of file ChWsbCalendar.php.
ChWsbCalendar::_getWeekNames | ( | $isMiniMode = false | ) |
Definition at line 101 of file ChWsbCalendar.php.
ChWsbCalendar::getBaseUri | ( | ) |
return base calendar url year and month will be added to this url automatically so if your base url is /m/some_module/calendar/, it will be transormed to /m/some_module/calendar/YEAR/MONTH, like /m/some_module/calendar/2009/3
Reimplemented in TagsCalendar, ChSitesCalendar, ChPollCalendar, ChBlogsCalendar, ChAdsCalendar, ChWsbTwigCalendar, ChWsbTextCalendar, ChWsbProfilesCalendar, ChWsbFilesCalendar, and CategoriesCalendar.
Definition at line 246 of file ChWsbCalendar.php.
ChWsbCalendar::getBrowseUri | ( | ) |
return browse entries url year and month and day will be added to this url automatically so if your base url is /m/some_module/browse/calendar/, it will be transormed to /m/some_module/browse/calendar/YEAR/MONTH/DAY, like /m/some_module/browse/calendar/2009/3/15
Reimplemented in TagsCalendar, ChSitesCalendar, ChPollCalendar, ChBlogsCalendar, ChAdsCalendar, ChWsbTwigCalendar, ChWsbTextCalendar, ChWsbProfilesCalendar, ChWsbFilesCalendar, and CategoriesCalendar.
Definition at line 258 of file ChWsbCalendar.php.
ChWsbCalendar::getData | ( | ) |
return records for current month, there is mandatory field Day
- a day for current row use the following class variables to pass to your database query $this->iYear, $this->iMonth, $this->iNextYear, $this->iNextMonth
for example:
return $db->getAll (" SELECT *, DAYOFMONTH(FROM_UNIXTIME(EventStart
)) AS Day
FROM my_table
WHERE Date
>= UNIX_TIMESTAMP('{$this->iYear}-{$this->iMonth}-1') AND Date
< UNIX_TIMESTAMP('{$this->iNextYear}-{$this->iNextMonth}-1') AND Status
= 'approved'");
Reimplemented in TagsCalendar, ChSitesCalendar, ChPollCalendar, ChBlogsCalendar, ChAdsCalendar, ChWsbTwigCalendar, ChWsbTextCalendar, ChWsbProfilesCalendar, ChWsbFilesCalendar, and CategoriesCalendar.
Definition at line 221 of file ChWsbCalendar.php.
ChWsbCalendar::getEntriesNames | ( | ) |
return entries names in single and plural forms, for example: ('event', 'events') or ('profile', 'profiles')
Reimplemented in TagsCalendar, ChStoreCalendar, ChSitesCalendar, ChPollCalendar, ChGroupsCalendar, ChEventsCalendar, ChBlogsCalendar, ChAdsCalendar, ChWsbTwigCalendar, ChWsbTextCalendar, ChWsbProfilesCalendar, ChWsbFilesCalendar, and CategoriesCalendar.
Definition at line 268 of file ChWsbCalendar.php.
ChWsbCalendar::getMonthUrl | ( | $isNextMoths, | |
$isMiniMode = false |
|||
) |
return url for previous/next month
Reimplemented in ChBlogsCalendar, ChWsbTwigCalendar, ChWsbTextCalendar, and ChWsbFilesCalendar.
Definition at line 277 of file ChWsbCalendar.php.
ChWsbCalendar::getTitle | ( | ) |
Definition at line 200 of file ChWsbCalendar.php.
ChWsbCalendar::getUnit | ( | & | $aData | ) |
deprecated
return html for data unit for some day, it is:
Reimplemented in ChBlogsCalendar, ChWsbTextCalendar, ChWsbProfilesCalendar, and ChWsbFilesCalendar.
Definition at line 234 of file ChWsbCalendar.php.
ChWsbCalendar::$iFirstWeekDay |
Definition at line 51 of file ChWsbCalendar.php.
ChWsbCalendar::$iMonth |
Definition at line 50 of file ChWsbCalendar.php.
ChWsbCalendar::$iNextMonth |
Definition at line 50 of file ChWsbCalendar.php.
ChWsbCalendar::$iNextYear |
Definition at line 50 of file ChWsbCalendar.php.
ChWsbCalendar::$iNumDaysInMonth |
Definition at line 51 of file ChWsbCalendar.php.
ChWsbCalendar::$iPrevMonth |
Definition at line 50 of file ChWsbCalendar.php.
ChWsbCalendar::$iPrevYear |
Definition at line 50 of file ChWsbCalendar.php.
ChWsbCalendar::$iWeekEnd |
Definition at line 51 of file ChWsbCalendar.php.
ChWsbCalendar::$iWeekStart |
Definition at line 51 of file ChWsbCalendar.php.
ChWsbCalendar::$iYear |
Definition at line 50 of file ChWsbCalendar.php.
ChWsbCalendar::$sMonthName |
Definition at line 51 of file ChWsbCalendar.php.