Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LocalActionsBlock.php

function 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\Block

Code

public function build() {
    $route_name = $this->routeMatch
        ->getRouteName();
    $local_actions = $this->localActionManager
        ->getActionsForRoute($route_name);
    return $local_actions;
}
RSS feed
Powered by Drupal