function SessionWorkspaceNegotiator::setActiveWorkspace
Same name and namespace in other branches
- 10 core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php \Drupal\workspaces\Negotiator\SessionWorkspaceNegotiator::setActiveWorkspace()
- 9 core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php \Drupal\workspaces\Negotiator\SessionWorkspaceNegotiator::setActiveWorkspace()
- 8.9.x core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php \Drupal\workspaces\Negotiator\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
1 call to SessionWorkspaceNegotiator::setActiveWorkspace()
- QueryParameterWorkspaceNegotiator::setActiveWorkspace in core/
modules/ workspaces/ src/ Negotiator/ QueryParameterWorkspaceNegotiator.php - Notifies the negotiator that the workspace ID returned has been accepted.
1 method overrides SessionWorkspaceNegotiator::setActiveWorkspace()
- QueryParameterWorkspaceNegotiator::setActiveWorkspace in core/
modules/ workspaces/ src/ Negotiator/ QueryParameterWorkspaceNegotiator.php - Notifies the negotiator that the workspace ID returned has been accepted.
File
-
core/
modules/ workspaces/ src/ Negotiator/ SessionWorkspaceNegotiator.php, line 38
Class
- SessionWorkspaceNegotiator
- Defines the session workspace negotiator.
Namespace
Drupal\workspaces\NegotiatorCode
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.