function event_calendar_table in Event 5.2
Same name and namespace in other branches
- 5 event.module \event_calendar_table()
Creates a themed table of events.
Parameters
$op :
$date The date:
$end_date end of the menu:
$types limit to given event node types:
$terms limit to nodes with these :
Return value
A fully themed table.
Related topics
1 call to event_calendar_table()
- event_page in ./
event.module - Displays a page containing event information. The page layout defaults to a graphical calendar.
File
- ./
event.module, line 655
Code
function event_calendar_table($op, $date, $end_date, $types = NULL, $terms = NULL, $rewrite_parameter = array()) {
$today = _event_user_date();
$thead[] = array(
'data' => ' ',
);
$cur_day = $today['day'];
$cur_date = $date;
$cur_date['hour'] = '00';
$cur_date['minute'] = '00';
$weekdays = event_week_days();
event_calendar_data($date, 'table', $types, $terms, 'prepopulate', $end_date, $rewrite_parameter);
while (event_is_later($end_date, $cur_date)) {
$month_name = event_format_date($cur_date, 'custom', 'M');
$dow = _event_day_of_week($cur_date) + 1;
$tbody[][] = array(
'colspan' => 3,
'class' => strtolower("{$month_name} " . $weekdays[$dow]['day'] . ($cur_date == $today ? ' today' : '') . ($cur_date['day'] == $date['day'] ? ' selected' : '')),
'id' => strtolower($month_name . $cur_date['date']),
'data' => event_render_day($cur_date, 'table', $types, $terms, $rewrite_parameter),
);
$cur_date = event_date_later($cur_date, 1);
}
return array(
$thead,
$tbody,
);
}