Cheetah
Public Member Functions | Public Attributes | List of all members
ChBlogsCalendar Class Reference
Inheritance diagram for ChBlogsCalendar:
ChTemplCalendar ChBaseCalendar ChWsbCalendar

Public Member Functions

 __construct ($iYear, $iMonth, &$oModule)
 
 getData ()
 
 getUnit (&$aData)
 
 getBaseUri ()
 
 getBrowseUri ()
 
 getEntriesNames ()
 
 getMonthUrl ($isNextMoths, $isMiniMode=false)
 
 setBlockId ($iBlockID)
 
 setDynamicUrl ($s)
 
- Public Member Functions inherited from ChTemplCalendar
 __construct ($iYear, $iMonth)
 
 __construct ($iYear, $iMonth)
 
 __construct ($iYear, $iMonth)
 
- Public Member Functions inherited from ChBaseCalendar
 display ($isMiniMode=false)
 
- Public Member Functions inherited from ChWsbCalendar
 _getWeekNames ($isMiniMode=false)
 
 _getCalendarGrid (&$aCalendarGrid)
 
 _getCalendar ()
 
 getTitle ()
 

Public Attributes

 $sDynamicUrl = ''
 
 $iBlockID = 0
 
 $oBlogsModule
 
- Public Attributes inherited from ChWsbCalendar
 $iYear
 
 $iMonth
 
 $iPrevYear
 
 $iPrevMonth
 
 $iNextYear
 
 $iNextMonth
 
 $iFirstWeekDay
 
 $iNumDaysInMonth
 
 $sMonthName
 
 $iWeekStart
 
 $iWeekEnd
 

Detailed Description

Definition at line 10 of file ChBlogsCalendar.php.

Constructor & Destructor Documentation

◆ __construct()

ChBlogsCalendar::__construct (   $iYear,
  $iMonth,
$oModule 
)

Definition at line 16 of file ChBlogsCalendar.php.

Member Function Documentation

◆ getBaseUri()

ChBlogsCalendar::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 from ChWsbCalendar.

Definition at line 74 of file ChBlogsCalendar.php.

◆ getBrowseUri()

ChBlogsCalendar::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 from ChWsbCalendar.

Definition at line 79 of file ChBlogsCalendar.php.

◆ getData()

ChBlogsCalendar::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(Blogstart)) 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 from ChWsbCalendar.

Definition at line 35 of file ChBlogsCalendar.php.

◆ getEntriesNames()

ChBlogsCalendar::getEntriesNames ( )

return entries names in single and plural forms, for example: ('event', 'events') or ('profile', 'profiles')

Reimplemented from ChWsbCalendar.

Definition at line 84 of file ChBlogsCalendar.php.

◆ getMonthUrl()

ChBlogsCalendar::getMonthUrl (   $isNextMoths,
  $isMiniMode = false 
)

return url for previous/next month

Reimplemented from ChWsbCalendar.

Definition at line 89 of file ChBlogsCalendar.php.

◆ getUnit()

ChBlogsCalendar::getUnit ( $aData)

return html for data unit for some day, it is:

  • icon 32x32 with link if data have associated image, use $GLOBALS['oFunctions']->sysIcon() to return small icon
  • data title with link if data have no associated image

Reimplemented from ChWsbCalendar.

Definition at line 54 of file ChBlogsCalendar.php.

◆ setBlockId()

ChBlogsCalendar::setBlockId (   $iBlockID)

Definition at line 97 of file ChBlogsCalendar.php.

◆ setDynamicUrl()

ChBlogsCalendar::setDynamicUrl (   $s)

Definition at line 102 of file ChBlogsCalendar.php.

Member Data Documentation

◆ $iBlockID

ChBlogsCalendar::$iBlockID = 0

Definition at line 13 of file ChBlogsCalendar.php.

◆ $oBlogsModule

ChBlogsCalendar::$oBlogsModule

Definition at line 14 of file ChBlogsCalendar.php.

◆ $sDynamicUrl

ChBlogsCalendar::$sDynamicUrl = ''

Definition at line 12 of file ChBlogsCalendar.php.


The documentation for this class was generated from the following file: