function SessionWorkspaceNegotiator::getActiveWorkspace
Same name in other branches
- 9 core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php \Drupal\workspaces\Negotiator\SessionWorkspaceNegotiator::getActiveWorkspace()
- 10 core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php \Drupal\workspaces\Negotiator\SessionWorkspaceNegotiator::getActiveWorkspace()
- 11.x core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php \Drupal\workspaces\Negotiator\SessionWorkspaceNegotiator::getActiveWorkspace()
Overrides WorkspaceNegotiatorInterface::getActiveWorkspace
1 method overrides SessionWorkspaceNegotiator::getActiveWorkspace()
- 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 64
Class
- SessionWorkspaceNegotiator
- Defines the session workspace negotiator.
Namespace
Drupal\workspaces\NegotiatorCode
public function getActiveWorkspace(Request $request) {
$workspace_id = $this->session
->get('active_workspace_id');
if ($workspace_id && ($workspace = $this->workspaceStorage
->load($workspace_id))) {
return $workspace;
}
return NULL;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.