Skip to content
Snippets Groups Projects

1.2.x

Open Aman Naudiyal requested to merge issue/group_clone-3424303:1.2.x into 1.1.x
1 file
+ 12
0
Compare changes
  • Side-by-side
  • Inline
+ 12
0
@@ -46,3 +46,15 @@ function group_clone_group_access(GroupInterface $group, string $operation, Acco
->addCacheableDependency($cloning_settings)
->addCacheContexts(['user.permissions']);
}
/**
* Implements hook_entity_operation_alter().
*/
function group_clone_entity_operation_alter(array &$operations, $entity) {
if ($entity === null) {
return;
}
if ($entity->getEntityTypeId() === 'group' && \array_key_exists('duplicate', $operations)) {
$operations['duplicate']['title'] = t('Clone');
}
}
Loading