function social_event_views_data_alter in Open Social 8.9
Same name and namespace in other branches
- 8 modules/social_features/social_event/social_event.module \social_event_views_data_alter()
- 8.2 modules/social_features/social_event/social_event.module \social_event_views_data_alter()
- 8.3 modules/social_features/social_event/social_event.module \social_event_views_data_alter()
- 8.4 modules/social_features/social_event/social_event.module \social_event_views_data_alter()
- 8.5 modules/social_features/social_event/social_event.module \social_event_views_data_alter()
- 8.6 modules/social_features/social_event/social_event.module \social_event_views_data_alter()
- 8.7 modules/social_features/social_event/social_event.module \social_event_views_data_alter()
- 8.8 modules/social_features/social_event/social_event.module \social_event_views_data_alter()
- 10.3.x modules/social_features/social_event/social_event.module \social_event_views_data_alter()
- 10.0.x modules/social_features/social_event/social_event.module \social_event_views_data_alter()
- 10.1.x modules/social_features/social_event/social_event.module \social_event_views_data_alter()
- 10.2.x modules/social_features/social_event/social_event.module \social_event_views_data_alter()
Implements hook_views_data_alter().
File
- modules/
social_features/ social_event/ social_event.module, line 347 - The Social event module.
Code
function social_event_views_data_alter(array &$data) {
$data['node']['event_enrolled_or_created_filter'] = [
'title' => t('Event enrolled or created'),
'filter' => [
'title' => t('Event enrolled or created'),
'help' => t('Enable events for on the user profiles.'),
'field' => 'field_event',
'id' => 'event_enrolled_or_created',
],
];
$data['node']['event_passed_upcoming_sort'] = [
'title' => t('Event sorting (passed and upcoming)'),
'help' => t('For upcoming events sort ASC by start date and for passed events change order to DESC.'),
'sort' => [
'field' => 'field_event_date_value',
'id' => 'event_passed_upcoming_sort',
],
];
$data['node__field_event_date']['event_date'] = [
'title' => t('Event date'),
'group' => t('Social'),
'filter' => [
'title' => t('Event date'),
'help' => t('Filter events by start date and end date'),
'id' => 'social_event_date_filter',
'field' => 'field_event_date_value',
],
'sort' => [
'title' => t('Event sorting (passed and upcoming)'),
'help' => t('For upcoming events sort ASC by start date and for passed events change order to DESC.'),
'id' => 'social_event_date_sort',
'field' => 'field_event_date_value',
],
];
}