You are here

public function SessionWorkspaceNegotiator::__construct in Workspace 8.2

Constructor.

Parameters

\Drupal\Core\Session\AccountInterface $current_user: The current user.

\Symfony\Component\HttpFoundation\Session\Session $session: The session.

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

File

src/Negotiator/SessionWorkspaceNegotiator.php, line 47

Class

SessionWorkspaceNegotiator
Defines the session workspace negotiator.

Namespace

Drupal\workspace\Negotiator

Code

public function __construct(AccountInterface $current_user, Session $session, EntityTypeManagerInterface $entity_type_manager) {
  $this->currentUser = $current_user;
  $this->session = $session;
  $this->workspaceStorage = $entity_type_manager
    ->getStorage('workspace');
}