function devel_menu_links_discovered_alter

Same name in other branches
  1. 5.x devel.module \devel_menu_links_discovered_alter()

Implements hook_menu_links_discovered_alter().

File

./devel.module, line 118

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',
        ];
    }
}