function SessionWorkspaceNegotiator::getActiveWorkspace
File
-
core/
modules/ workspaces/ src/ Negotiator/ SessionWorkspaceNegotiator.php, line 40
Class
- SessionWorkspaceNegotiator
- Defines the session workspace negotiator.
Namespace
Drupal\workspaces\NegotiatorCode
public function getActiveWorkspace(Request $request) {
$workspace_id = $this->getActiveWorkspaceId($request);
if ($workspace_id && $workspace = $this->entityTypeManager
->getStorage('workspace')
->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.