function WorkspaceSwitcherBlock::__construct
Same name in other branches
- 9 core/modules/workspaces/src/Plugin/Block/WorkspaceSwitcherBlock.php \Drupal\workspaces\Plugin\Block\WorkspaceSwitcherBlock::__construct()
- 8.9.x core/modules/workspaces/src/Plugin/Block/WorkspaceSwitcherBlock.php \Drupal\workspaces\Plugin\Block\WorkspaceSwitcherBlock::__construct()
- 11.x 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 55
Class
- WorkspaceSwitcherBlock
- Provides a 'Workspace switcher' block.
Namespace
Drupal\workspaces\Plugin\BlockCode
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.