function ShortcutHooks::blockAlter
Same name and namespace in other branches
- 11.x core/modules/shortcut/src/Hook/ShortcutHooks.php \Drupal\shortcut\Hook\ShortcutHooks::blockAlter()
Implements hook_block_alter().
Attributes
#[Hook('block_alter')]
File
-
core/
modules/ shortcut/ src/ Hook/ ShortcutHooks.php, line 223
Class
- ShortcutHooks
- Hook implementations for shortcut.
Namespace
Drupal\shortcut\HookCode
public function blockAlter(array &$definitions) : void {
// Add the allow_in_navigation attribute to the navigation_shortcuts block.
// @todo Refactor to use actual block Attribute once
// https://www.drupal.org/project/drupal/issues/3443882 is merged.
$definitions['navigation_shortcuts']['allow_in_navigation'] = TRUE;
// Hide Navigation specific blocks from the generic UI.
$definitions['navigation_shortcuts']['_block_ui_hidden'] = TRUE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.