You are here

public function WorkspaceSwitcherForm::__construct in Workspace 8.2

Constructs a new WorkspaceSwitcherForm.

Parameters

\Drupal\workspace\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.

File

src/Form/WorkspaceSwitcherForm.php, line 49

Class

WorkspaceSwitcherForm
Provides a form that activates a different workspace.

Namespace

Drupal\workspace\Form

Code

public function __construct(WorkspaceManagerInterface $workspace_manager, EntityTypeManagerInterface $entity_type_manager, MessengerInterface $messenger) {
  $this->workspaceManager = $workspace_manager;
  $this->workspaceStorage = $entity_type_manager
    ->getStorage('workspace');
  $this->messenger = $messenger;
}