menu_ui_block_view_system_menu_block_alter(array &$build, BlockPluginInterface $block)
Implements hook_block_view_BASE_BLOCK_ID_alter() for 'system_menu_block'.
File
- core/modules/menu_ui/menu_ui.module, line 120
- Allows administrators to customize the site's navigation menus.
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'] = array( 'route_parameters' => array('menu' => $menu_name), ); } }
Please login to continue.