function WorkspaceManagerInterface::setActiveWorkspace
Same name and namespace in other branches
- 11.x core/modules/workspaces/src/WorkspaceManagerInterface.php \Drupal\workspaces\WorkspaceManagerInterface::setActiveWorkspace()
- 10 core/modules/workspaces/src/WorkspaceManagerInterface.php \Drupal\workspaces\WorkspaceManagerInterface::setActiveWorkspace()
- 9 core/modules/workspaces/src/WorkspaceManagerInterface.php \Drupal\workspaces\WorkspaceManagerInterface::setActiveWorkspace()
- 8.9.x core/modules/workspaces/src/WorkspaceManagerInterface.php \Drupal\workspaces\WorkspaceManagerInterface::setActiveWorkspace()
Sets the active workspace.
Parameters
\Drupal\workspaces\WorkspaceInterface $workspace: The workspace to set as active.
bool $persist: (optional) Whether to persist this workspace in the first applicable negotiator. Defaults to TRUE.
Return value
$this
Throws
\Drupal\workspaces\WorkspaceAccessException Thrown when the current user doesn't have access to view the workspace.
1 method overrides WorkspaceManagerInterface::setActiveWorkspace()
- WorkspaceManager::setActiveWorkspace in core/
modules/ workspaces/ src/ WorkspaceManager.php - Sets the active workspace.
File
-
core/
modules/ workspaces/ src/ WorkspaceManagerInterface.php, line 40
Class
- WorkspaceManagerInterface
- Provides an interface for managing Workspaces.
Namespace
Drupal\workspacesCode
public function setActiveWorkspace(WorkspaceInterface $workspace, bool $persist = TRUE);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.