function NavigationTestHooks::blockAlter
Implements hook_block_alter().
File
-
core/
modules/ navigation/ tests/ navigation_test/ src/ Hook/ NavigationTestHooks.php, line 29
Class
- NavigationTestHooks
- Hooks implementations for navigation_test module.
Namespace
Drupal\navigation_test\HookCode
public function blockAlter(&$definitions) : void {
if ($this->state
->get('navigation_safe_alter')) {
$definitions['navigation_link']['allow_in_navigation'] = TRUE;
$definitions['navigation_shortcuts']['allow_in_navigation'] = FALSE;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.