function NavigationHooks::blockAlter
Implements hook_block_alter().
File
-
core/
modules/ navigation/ src/ Hook/ NavigationHooks.php, line 157
Class
- NavigationHooks
- Hook implementations for navigation.
Namespace
Drupal\navigation\HookCode
public function blockAlter(&$definitions) : void {
$hidden = [
'navigation_user',
'navigation_shortcuts',
'navigation_menu',
'navigation_link',
];
foreach ($hidden as $block_id) {
if (isset($definitions[$block_id])) {
$definitions[$block_id]['_block_ui_hidden'] = TRUE;
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.