function menu_operations_link_test_entity_operation_alter

Same name and namespace in other branches
  1. 10 core/modules/menu_link_content/tests/menu_operations_link_test/menu_operations_link_test.module \menu_operations_link_test_entity_operation_alter()

Implements hook_entity_operation_alter().

File

core/modules/menu_link_content/tests/menu_operations_link_test/menu_operations_link_test.module, line 15

Code

function menu_operations_link_test_entity_operation_alter(array &$operations, EntityInterface $entity) {
    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.