function SessionWorkspaceNegotiator::setActiveWorkspace

Notifies the negotiator that the workspace ID returned has been accepted.

Parameters

\Drupal\workspaces\WorkspaceInterface $workspace: The negotiated workspace entity.

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.