public function WorkspaceManagerInterface::setActiveWorkspace in Drupal 9
Same name and namespace in other branches
- 8 core/modules/workspaces/src/WorkspaceManagerInterface.php \Drupal\workspaces\WorkspaceManagerInterface::setActiveWorkspace()
Sets the active workspace via the workspace negotiators.
Parameters
\Drupal\workspaces\WorkspaceInterface $workspace: The workspace to set as active.
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 via the workspace negotiators.
File
- core/
modules/ workspaces/ src/ WorkspaceManagerInterface.php, line 58
Class
- WorkspaceManagerInterface
- Provides an interface for managing Workspaces.
Namespace
Drupal\workspacesCode
public function setActiveWorkspace(WorkspaceInterface $workspace);