-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgroup_members_extra.api.php
51 lines (45 loc) · 1.25 KB
/
group_members_extra.api.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* @file
* Hooks specific to the Group Members Extra module.
*/
use Drupal\group\Entity\GroupInterface;
/**
* @addtogroup hooks
* @{
*/
/**
* Alter the links for the group_membership_operations block.
*
* @param array $operations
* A list of links to be set in an 'operations' element.
* @param GroupInterface $group
* The group to alter the operations for.
*
* @see \Drupal\group\Plugin\Block\GroupOperationsBlock
* @see \Drupal\Core\Render\Element\Dropbutton
*/
function hook_group_members_extra_membership_operations_alter(array &$operations, GroupInterface $group) {
if ($group->label() == 'Hotel California') {
unset($operations['group-leave']);
}
}
/**
* Alter the links for the group_content_operations block.
*
* @param array $operations
* A list of links to be set in an 'operations' element.
* @param GroupInterface $group
* The group to alter the operations for.
*
* @see \Drupal\group\Plugin\Block\GroupOperationsBlock
* @see \Drupal\Core\Render\Element\Dropbutton
*/
function hook_group_members_extra_content_operations_alter(array &$operations, GroupInterface $group) {
if ($group->label() == 'Hotel California') {
unset($operations['gnode-create-page']);
}
}
/**
* @} End of "addtogroup hooks".
*/