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()
- 10 core/lib/Drupal/Core/Menu/Plugin/Block/LocalActionsBlock.php \Drupal\Core\Menu\Plugin\Block\LocalActionsBlock::build()
- 11.x core/lib/Drupal/Core/Menu/Plugin/Block/LocalActionsBlock.php \Drupal\Core\Menu\Plugin\Block\LocalActionsBlock::build()
File
-
core/
lib/ Drupal/ Core/ Menu/ Plugin/ Block/ LocalActionsBlock.php, line 78
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.