function MenuController::menuTitle
Same name in other branches
- 9 core/modules/menu_ui/src/Controller/MenuController.php \Drupal\menu_ui\Controller\MenuController::menuTitle()
- 10 core/modules/menu_ui/src/Controller/MenuController.php \Drupal\menu_ui\Controller\MenuController::menuTitle()
- 11.x core/modules/menu_ui/src/Controller/MenuController.php \Drupal\menu_ui\Controller\MenuController::menuTitle()
Route title callback.
Parameters
\Drupal\system\MenuInterface $menu: The menu entity.
Return value
array The menu label as a render array.
1 string reference to 'MenuController::menuTitle'
- menu_ui.routing.yml in core/
modules/ menu_ui/ menu_ui.routing.yml - core/modules/menu_ui/menu_ui.routing.yml
File
-
core/
modules/ menu_ui/ src/ Controller/ MenuController.php, line 74
Class
- MenuController
- Returns responses for Menu routes.
Namespace
Drupal\menu_ui\ControllerCode
public function menuTitle(MenuInterface $menu) {
return [
'#markup' => $menu->label(),
'#allowed_tags' => Xss::getHtmlTagList(),
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.