function devel_menu_links_discovered_alter in Devel 8.3
Same name and namespace in other branches
- 8 devel.module \devel_menu_links_discovered_alter()
- 8.2 devel.module \devel_menu_links_discovered_alter()
- 4.x devel.module \devel_menu_links_discovered_alter()
Implements hook_menu_links_discovered_alter().
File
- ./
devel.module, line 114 - This module holds functions useful for Drupal development.
Code
function devel_menu_links_discovered_alter(&$links) {
// Conditionally add the Layouts info menu link.
if (\Drupal::moduleHandler()
->moduleExists('layout_discovery')) {
$links['devel.layout_info'] = [
'title' => new TranslatableMarkup('Layouts Info'),
'route_name' => 'devel.layout_info',
'description' => new TranslatableMarkup('Overview of layouts available to the site.'),
'menu_name' => 'devel',
];
}
}