DecoupledMenusTestHooks.php

Namespace

Drupal\decoupled_menus_test\Hook

File

core/modules/system/tests/modules/decoupled_menus_test/src/Hook/DecoupledMenusTestHooks.php

View source
<?php

declare (strict_types=1);
namespace Drupal\decoupled_menus_test\Hook;

use Drupal\Core\Hook\Attribute\Hook;

/**
 * Hook implementations for decoupled_menus_test.
 */
class DecoupledMenusTestHooks {
    
    /**
     * Implements hook_menu_links_discovered_alter().
     */
    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';
    }

}

Classes

Title Deprecated Summary
DecoupledMenusTestHooks Hook implementations for decoupled_menus_test.

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