Issue #2239833 by Wim Leers: Regression: Menu contextual links no longer visible in menu blocks.
parent
677b9fc45f
commit
dda140f91e
|
@ -300,12 +300,10 @@ function menu_ui_block_view_system_menu_block_alter(array &$build, BlockPluginIn
|
|||
// Add contextual links for system menu blocks.
|
||||
$menus = menu_list_system_menus();
|
||||
$menu_name = $block->getDerivativeId();
|
||||
if (isset($menus[$menu_name]) && isset($build['content'])) {
|
||||
foreach (Element::children($build['content']) as $key) {
|
||||
$build['#contextual_links']['menu'] = array(
|
||||
'route_parameters' => array('menu' => $build['content'][$key]['#original_link']['menu_name']),
|
||||
);
|
||||
}
|
||||
if (isset($menus[$menu_name])) {
|
||||
$build['#contextual_links']['menu'] = array(
|
||||
'route_parameters' => array('menu' => $menu_name),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue