Changeset 25507 for trunk/include/calendar_base.class.php
- Timestamp:
- Nov 17, 2013, 4:03:32 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/calendar_base.class.php
r23618 r25507 23 23 24 24 /** 25 * @package functions\calendar 26 */ 27 28 29 /** 25 30 * Base class for monthly and weekly calendar styles 26 31 */ 27 class CalendarBase32 abstract class CalendarBase 28 33 { 29 / / db column on which this calendar works34 /** db column on which this calendar works */ 30 35 var $date_field; 31 / / used for queries (INNER JOIN or normal)36 /** used for queries (INNER JOIN or normal) */ 32 37 var $inner_sql; 33 / /38 /** used to store db fields */ 34 39 var $calendar_levels; 35 40 36 41 /** 37 * Initialize the calendar 38 * @param string inner_sql used for queries (INNER JOIN or normal) 42 * Generate navigation bars for category page. 43 * 44 * @return boolean false indicates that thumbnails where not included 45 */ 46 abstract function generate_category_content(); 47 48 /** 49 * Returns a sql WHERE subquery for the date field. 50 * 51 * @param int $max_levels (e.g. 2=only year and month) 52 * @return string 53 */ 54 abstract function get_date_where($max_levels); 55 56 /** 57 * Initialize the calendar. 58 * 59 * @param string $inner_sql 39 60 */ 40 61 function initialize($inner_sql) … … 52 73 } 53 74 75 /** 76 * Returns the calendar title (with HTML). 77 * 78 * @return string 79 */ 54 80 function get_display_name() 55 81 { … … 83 109 } 84 110 85 //--------------------------------------------------------- private members --- 86 /** 87 * Returns a display name for a date component optionally using labels 88 */ 89 function get_date_component_label($level, $date_component) 111 /** 112 * Returns a display name for a date component optionally using labels. 113 * 114 * @return string 115 */ 116 protected function get_date_component_label($level, $date_component) 90 117 { 91 118 $label = $date_component; … … 102 129 103 130 /** 104 * Gets a nice display name for a date to be shown in previos/next links. 105 */ 106 function get_date_nice_name($date) 131 * Gets a nice display name for a date to be shown in previous/next links 132 * 133 * @param string $date 134 * @return string 135 */ 136 protected function get_date_nice_name($date) 107 137 { 108 138 $date_components = explode('-', $date); … … 126 156 * Creates a calendar navigation bar. 127 157 * 128 * @param array date_components129 * @param array items - hash of items to put in the bar (e.g. 2005,2006)130 * @param bool show_any - adds any link to the end of the bar131 * @param bool show_empty - shows all labels even those without items132 * @param array labels - optional labels for items (e.g. Jan,Feb,...)133 * @return string the navigation bar134 */ 135 function get_nav_bar_from_items($date_components, $items,158 * @param array $date_components 159 * @param array $items - hash of items to put in the bar (e.g. 2005,2006) 160 * @param bool $show_any - adds any link to the end of the bar 161 * @param bool $show_empty - shows all labels even those without items 162 * @param array $labels - optional labels for items (e.g. Jan,Feb,...) 163 * @return string 164 */ 165 protected function get_nav_bar_from_items($date_components, $items, 136 166 $show_any, 137 167 $show_empty=false, $labels=null) … … 204 234 * Creates a calendar navigation bar for a given level. 205 235 * 206 * @param int level - the level (0-year,1-month/week,2-day) 207 * @return void 208 */ 209 function build_nav_bar($level, $labels=null) 236 * @param int $level - 0-year, 1-month/week, 2-day 237 */ 238 protected function build_nav_bar($level, $labels=null) 210 239 { 211 240 global $template, $conf, $page; … … 262 291 * the currently choosen date. 263 292 */ 264 function build_next_prev()293 protected function build_next_prev() 265 294 { 266 295 global $template, $page; … … 344 373 } 345 374 } 375 346 376 ?>
Note: See TracChangeset
for help on using the changeset viewer.