function menu_ui_block_view_system_menu_block_alter
Same name in other branches
- 9 core/modules/menu_ui/menu_ui.module \menu_ui_block_view_system_menu_block_alter()
- 10 core/modules/menu_ui/menu_ui.module \menu_ui_block_view_system_menu_block_alter()
- 11.x core/modules/menu_ui/menu_ui.module \menu_ui_block_view_system_menu_block_alter()
Implements hook_block_view_BASE_BLOCK_ID_alter() for 'system_menu_block'.
File
-
core/
modules/ menu_ui/ menu_ui.module, line 85
Code
function menu_ui_block_view_system_menu_block_alter(array &$build, BlockPluginInterface $block) {
if ($block->getBaseId() == 'system_menu_block') {
$menu_name = $block->getDerivativeId();
$build['#contextual_links']['menu'] = [
'route_parameters' => [
'menu' => $menu_name,
],
];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.