function LocalActionsBlock::build
Same name in other branches
- 9 core/lib/Drupal/Core/Menu/Plugin/Block/LocalActionsBlock.php \Drupal\Core\Menu\Plugin\Block\LocalActionsBlock::build()
- 8.9.x core/lib/Drupal/Core/Menu/Plugin/Block/LocalActionsBlock.php \Drupal\Core\Menu\Plugin\Block\LocalActionsBlock::build()
- 10 core/lib/Drupal/Core/Menu/Plugin/Block/LocalActionsBlock.php \Drupal\Core\Menu\Plugin\Block\LocalActionsBlock::build()
Overrides BlockPluginInterface::build
File
-
core/
lib/ Drupal/ Core/ Menu/ Plugin/ Block/ LocalActionsBlock.php, line 79
Class
- LocalActionsBlock
- Provides a block to display the local actions.
Namespace
Drupal\Core\Menu\Plugin\BlockCode
public function build() {
$route_name = $this->routeMatch
->getRouteName();
$local_actions = $this->localActionManager
->getActionsForRoute($route_name);
return $local_actions;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.