function NavigationHooks::blockBuildLocalTasksBlockAlter
Implements hook_block_build_BASE_BLOCK_ID_alter().
File
-
core/
modules/ navigation/ src/ Hook/ NavigationHooks.php, line 119
Class
- NavigationHooks
- Hook implementations for navigation.
Namespace
Drupal\navigation\HookCode
public function blockBuildLocalTasksBlockAlter(array &$build, BlockPluginInterface $block) {
$navigation_renderer = \Drupal::service('navigation.renderer');
assert($navigation_renderer instanceof NavigationRenderer);
$navigation_renderer->removeLocalTasks($build, $block);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.