Skip to content
Snippets Groups Projects
Commit c935f009 authored by Ivan Doroshenko's avatar Ivan Doroshenko Committed by Alexander Shumenko
Browse files

Issue #2917401 by Matroskeen: Broken menu links

parent 2ce03068
No related branches found
No related tags found
No related merge requests found
......@@ -124,14 +124,16 @@ function config_pages_menu_links_discovered_alter(&$links) {
$menu_path = $page_type->menu['path'];
$title = $page_type->label();
$parent_route_name = config_pages_find_parent_route_name($menu_path);
$description = !empty($page_type->menu['description']) ? t($page_type->menu['description']) : '';
$weight = !empty($page_type->menu['weight']) ? $page_type->menu['weight'] : 0;
$links['config_pages.' . $bundle] = [
'title' => t($title),
'description' => t($page_type->menu['description']),
'description' => $description,
'parent' => $parent_route_name,
'route_name' => 'config_pages.' . $bundle,
'enabled' => TRUE,
'weight' => ($page_type->menu['weight']) ? $page_type->menu['weight'] : 0,
'weight' => $weight,
];
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment