function SessionWorkspaceNegotiator::setActiveWorkspace

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

Overrides WorkspaceNegotiatorInterface::setActiveWorkspace

File

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

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.