You are here

public function WorkspaceSwitcherBlock::__construct in Workspace 8.2

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

src/Plugin/Block/WorkspaceSwitcherBlock.php, line 51

Class

WorkspaceSwitcherBlock
Provides a 'Workspace switcher' block.

Namespace

Drupal\workspace\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;
}