function devel_generate_menu_links_discovered_alter in Devel 8
Same name and namespace in other branches
- 8.3 devel_generate/devel_generate.module \devel_generate_menu_links_discovered_alter()
- 8.2 devel_generate/devel_generate.module \devel_generate_menu_links_discovered_alter()
- 4.x devel_generate/devel_generate.module \devel_generate_menu_links_discovered_alter()
Implements hook_menu_links_discovered_alter().
File
- devel_generate/
devel_generate.module, line 13
Code
function devel_generate_menu_links_discovered_alter(&$links) {
$devel_generate_plugins = $devel_generate_manager = \Drupal::service('plugin.manager.develgenerate')
->getDefinitions();
foreach ($devel_generate_plugins as $id => $plugin) {
$label = $plugin['label'];
$links["devel_generate.{$id}"] = array(
'title' => "Generate {$label}",
'parent' => 'system.admin_config_development',
'description' => $plugin['description'],
'route_name' => "devel_generate.{$id}",
);
}
}