function hook_group_operations_alter in Group 8
Same name and namespace in other branches
- 2.0.x group.api.php \hook_group_operations_alter()
Alter the links for the group_operations block.
Parameters
array $operations: A list of links to be set in an 'operations' element.
GroupInterface $group: The group to alter the operations for.
See also
\Drupal\group\Plugin\Block\GroupOperationsBlock
\Drupal\Core\Render\Element\Dropbutton
1 invocation of hook_group_operations_alter()
- GroupOperationsBlock::build in src/
Plugin/ Block/ GroupOperationsBlock.php - Builds and returns the renderable array for this block plugin.
File
- ./
group.api.php, line 27 - Hooks specific to the Group module.
Code
function hook_group_operations_alter(array &$operations, GroupInterface $group) {
if ($group
->label() == 'Hotel California') {
unset($operations['group-leave']);
}
}