You are here

public function WorkspaceSwitcherBlock::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/workspaces/src/Plugin/Block/WorkspaceSwitcherBlock.php \Drupal\workspaces\Plugin\Block\WorkspaceSwitcherBlock::__construct()
  2. 10 core/modules/workspaces/src/Plugin/Block/WorkspaceSwitcherBlock.php \Drupal\workspaces\Plugin\Block\WorkspaceSwitcherBlock::__construct()

Constructs a new WorkspaceSwitcherBlock instance.

Parameters

array $configuration: The plugin configuration.

string $plugin_id: The plugin ID.

mixed $plugin_definition: The plugin definition.

\Drupal\Core\Form\FormBuilderInterface $form_builder: The form builder.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

Overrides BlockPluginTrait::__construct

File

core/modules/workspaces/src/Plugin/Block/WorkspaceSwitcherBlock.php, line 51

Class

WorkspaceSwitcherBlock
Provides a 'Workspace switcher' block.

Namespace

Drupal\workspaces\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, FormBuilderInterface $form_builder, EntityTypeManagerInterface $entity_type_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->formBuilder = $form_builder;
  $this->entityTypeManager = $entity_type_manager;
}