social_group.views.inc in Open Social 8.7
Same filename and directory in other branches
- 8.9 modules/social_features/social_group/social_group.views.inc
- 8 modules/social_features/social_group/social_group.views.inc
- 8.2 modules/social_features/social_group/social_group.views.inc
- 8.3 modules/social_features/social_group/social_group.views.inc
- 8.4 modules/social_features/social_group/social_group.views.inc
- 8.5 modules/social_features/social_group/social_group.views.inc
- 8.6 modules/social_features/social_group/social_group.views.inc
- 8.8 modules/social_features/social_group/social_group.views.inc
- 10.3.x modules/social_features/social_group/social_group.views.inc
- 10.0.x modules/social_features/social_group/social_group.views.inc
- 10.1.x modules/social_features/social_group/social_group.views.inc
- 10.2.x modules/social_features/social_group/social_group.views.inc
Contains Views hooks.
File
modules/social_features/social_group/social_group.views.incView source
<?php
/**
* @file
* Contains Views hooks.
*/
/**
* Implements hook_views_data_alter().
*/
function social_group_views_data_alter(array &$data) {
// @TODO remove this when this hits https://www.drupal.org/node/2715285.
// Also note that by default the Group Creator is a Member now, that's
// where we check on in Drupal\social_group\Plugin\views\argument\UserUid.php.
$data['groups']['group_membership_or_creator'] = [
'group' => t('Group Content'),
'title' => t('User is member'),
'help' => t('User is member of the group'),
'argument' => [
'field' => 'uid',
'name table' => 'group_content_field_data',
'name field' => 'name',
'id' => 'group_content_user_uid',
'no group by' => TRUE,
],
];
// Create our own views VBO field for enrollments.
$data['views']['social_views_bulk_operations_bulk_form_group'] = [
'title' => t('Social Views bulk operations for Group Management'),
'help' => t("Process enrollments returned by the view with Views Bulk Operations actions."),
'field' => [
'id' => 'social_views_bulk_operations_bulk_form_group',
],
];
}Functions
|
Name |
Description |
|---|---|
| social_group_views_data_alter | Implements hook_views_data_alter(). |