function MenuExampleController::alternateMenu

Same name in other branches
  1. 3.x modules/menu_example/src/Controller/MenuExampleController.php \Drupal\menu_example\Controller\MenuExampleController::alternateMenu()

Show a menu link in a menu other than the default "Navigation" menu.

1 string reference to 'MenuExampleController::alternateMenu'
menu_example.routing.yml in modules/menu_example/menu_example.routing.yml
modules/menu_example/menu_example.routing.yml

File

modules/menu_example/src/Controller/MenuExampleController.php, line 53

Class

MenuExampleController
Controller routines for menu example routes.

Namespace

Drupal\menu_example\Controller

Code

public function alternateMenu() {
    return [
        '#markup' => $this->t('This will be in the Main menu instead of the default Tools menu'),
    ];
}