function SessionWorkspaceNegotiator::setActiveWorkspace

Same name in other branches
  1. 8.9.x core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php \Drupal\workspaces\Negotiator\SessionWorkspaceNegotiator::setActiveWorkspace()
  2. 10 core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php \Drupal\workspaces\Negotiator\SessionWorkspaceNegotiator::setActiveWorkspace()
  3. 11.x core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php \Drupal\workspaces\Negotiator\SessionWorkspaceNegotiator::setActiveWorkspace()

Overrides WorkspaceNegotiatorInterface::setActiveWorkspace

1 call to SessionWorkspaceNegotiator::setActiveWorkspace()
QueryParameterWorkspaceNegotiator::getActiveWorkspace in core/modules/workspaces/src/Negotiator/QueryParameterWorkspaceNegotiator.php
Gets the negotiated workspace, if any.

File

core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php, line 77

Class

SessionWorkspaceNegotiator
Defines the session workspace negotiator.

Namespace

Drupal\workspaces\Negotiator

Code

public function setActiveWorkspace(WorkspaceInterface $workspace) {
    $this->session
        ->set('active_workspace_id', $workspace->id());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.