function DecoupledMenusTestHooks::menuLinksDiscoveredAlter

Implements hook_menu_links_discovered_alter().

File

core/modules/system/tests/modules/decoupled_menus_test/src/Hook/DecoupledMenusTestHooks.php, line 17

Class

DecoupledMenusTestHooks
Hook implementations for decoupled_menus_test.

Namespace

Drupal\decoupled_menus_test\Hook

Code

public function menuLinksDiscoveredAlter(&$links) {
    // Sets a custom link relation type on a menu item.
    // @see https://tools.ietf.org/id/draft-pot-authentication-link-01.html
    $links['user.page']['options']['attributes']['rel'] = 'authenticated-as';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.