You are here

public function LocalTasksBlock::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Menu/Plugin/Block/LocalTasksBlock.php \Drupal\Core\Menu\Plugin\Block\LocalTasksBlock::__construct()
  2. 10 core/lib/Drupal/Core/Menu/Plugin/Block/LocalTasksBlock.php \Drupal\Core\Menu\Plugin\Block\LocalTasksBlock::__construct()

Creates a LocalTasksBlock instance.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Menu\LocalTaskManagerInterface $local_task_manager: The local task manager.

\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match.

Overrides BlockPluginTrait::__construct

File

core/lib/Drupal/Core/Menu/Plugin/Block/LocalTasksBlock.php, line 52

Class

LocalTasksBlock
Provides a "Tabs" block to display the local tasks.

Namespace

Drupal\Core\Menu\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, LocalTaskManagerInterface $local_task_manager, RouteMatchInterface $route_match) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->localTaskManager = $local_task_manager;
  $this->routeMatch = $route_match;
}