public function MenuController::menuTitle in Drupal 10
Same name and namespace in other branches
- 8 core/modules/menu_ui/src/Controller/MenuController.php \Drupal\menu_ui\Controller\MenuController::menuTitle()
- 9 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(),
];
}