function calendar_views_data_alter in Calendar 8
Same name and namespace in other branches
- 8.2 calendar.views.inc \calendar_views_data_alter()
Implements hook_views_data_alter().
File
- ./
calendar.views.inc, line 13 - Provides views data for the calendar module.
Code
function calendar_views_data_alter(array &$data) {
foreach ($data as $table_name => $table_data) {
foreach ($table_data as $property_name => $properties) {
if (isset($properties['argument']['id']) && $properties['argument']['id'] === 'date') {
$data[$table_name] += _calendar_create_field_arguments($property_name);
}
}
}
$data['views']['calendar_header'] = [
'title' => t('Calendar Header'),
'help' => t('Calendar heading or pager.'),
'area' => [
'id' => 'calendar_header',
],
];
}