function MenuOperationsLinkTestHooks::entityOperationAlter
Implements hook_entity_operation_alter().
File
-
core/
modules/ menu_link_content/ tests/ menu_operations_link_test/ src/ Hook/ MenuOperationsLinkTestHooks.php, line 20
Class
- MenuOperationsLinkTestHooks
- Hook implementations for menu_operations_link_test.
Namespace
Drupal\menu_operations_link_test\HookCode
public function entityOperationAlter(array &$operations, EntityInterface $entity) : void {
if (!$entity instanceof MenuLinkContent) {
return;
}
// Alter the title of the edit link appearing in operations menu.
$operations['edit']['title'] = t('Altered Edit Title');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.