public function SessionWorkspaceNegotiator::__construct in Drupal 8
Same name and namespace in other branches
- 9 core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php \Drupal\workspaces\Negotiator\SessionWorkspaceNegotiator::__construct()
- 10 core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php \Drupal\workspaces\Negotiator\SessionWorkspaceNegotiator::__construct()
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
- core/
modules/ workspaces/ src/ Negotiator/ SessionWorkspaceNegotiator.php, line 47
Class
- SessionWorkspaceNegotiator
- Defines the session workspace negotiator.
Namespace
Drupal\workspaces\NegotiatorCode
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');
}