function calendar_calendar_node in Calendar 5
3 calls to calendar_calendar_node()
- calendar_calendar_node_day in ./
calendar.module - calendar_calendar_node_month in ./
calendar.module - Implementation of hook_calendar_node() from the calendar_get_calendar() api calendar api is expecting a function for each calendar type but all of them need the same processing, so run them through a single function instead of duplicating the…
- calendar_calendar_node_week in ./
calendar.module
File
- ./
calendar.module, line 1156 - Adds calendar filtering and displays to Views.
Code
function calendar_calendar_node($node, $type) {
calendar_load_calendar_api();
if ($node->nid && $node->nid !== 0 && $node->calendar_start) {
// this is a real calendar, go ahead and display it
if (!$node->remote) {
// switch our psuedo nids back to the right values
$tmp = explode(':', $node->nid);
$node->nid = $tmp[0];
$node->instance = $tmp[1];
}
if (isset($node->calendar_node_theme)) {
return theme($node->calendar_node_theme, $node, $type);
}
else {
return theme('calendar_calendar_node', $node, $type);
}
}
else {
// surpress display of psuedo calendars added to force display of a blank calendar
// have to return some value for blank day so not overridden by normal calendar node theme
// a blank space seems to be sufficient to do that
return ' ';
}
}