function social_event_views_data_alter in Open Social 8.5
Same name and namespace in other branches
- 8.9 modules/social_features/social_event/social_event.module \social_event_views_data_alter()
- 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.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 237 - 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',
],
];
}