function WorkspaceSwitcherForm::__construct
Constructs a new WorkspaceSwitcherForm.
Parameters
\Drupal\workspaces\WorkspaceManagerInterface $workspace_manager: The workspace manager.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger service.
\Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManagerInterface $selection_manager: The entity reference selection plugin manager.
File
-
core/
modules/ workspaces/ src/ Form/ WorkspaceSwitcherForm.php, line 60
Class
- WorkspaceSwitcherForm
- Provides a form that activates a different workspace.
Namespace
Drupal\workspaces\FormCode
public function __construct(WorkspaceManagerInterface $workspace_manager, EntityTypeManagerInterface $entity_type_manager, MessengerInterface $messenger, SelectionPluginManagerInterface $selection_manager) {
$this->workspaceManager = $workspace_manager;
$this->workspaceStorage = $entity_type_manager->getStorage('workspace');
$this->messenger = $messenger;
$this->selectionManager = $selection_manager;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.