function spaces_calendar_context_define in Spaces 5.2
Same name and namespace in other branches
- 5 spaces_calendar/spaces_calendar.module \spaces_calendar_context_define()
Implementation of hook_context_define()
File
- spaces_calendar/
spaces_calendar.module, line 42
Code
function spaces_calendar_context_define() {
$items = array();
if (_spaces_calendar_enabled()) {
$items['calendar'] = array(
'namespace' => 'spaces',
'attribute' => 'feature',
'value' => 'calendar',
'views' => array(
'spaces_calendar_upcoming',
'spaces_calendar',
),
'node' => array(
variable_get('spaces_calendar_nodetype', ''),
),
'block' => array(
array(
'module' => 'views',
'delta' => 'spaces_calendar_upcoming',
'region' => 'right',
'weight' => -11,
),
),
'spaces' => array(
'label' => t('Calendar'),
'description' => t('An event calendar with optional iCal integration.'),
'menu' => array(
'calendar' => array(
'title' => t('Calendar'),
),
),
),
);
}
if (_spaces_calendar_ical_enabled()) {
$items['calendar']['node'][] = variable_get('spaces_calendar_feed_nodetype', '');
$items['calendar']['node'][] = variable_get('spaces_calendar_feed_itemtype', '');
$items['calendar']['spaces']['menu']['calendar/feeds'] = array(
'title' => t('Feeds'),
);
$items['calendar']['views'][] = 'spaces_calendar_feeds';
}
return $items;
}