You are here

public function WorkspaceNegotiatorInterface::getActiveWorkspace in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/workspaces/src/Negotiator/WorkspaceNegotiatorInterface.php \Drupal\workspaces\Negotiator\WorkspaceNegotiatorInterface::getActiveWorkspace()

Gets the negotiated workspace, if any.

Note that it is the responsibility of each implementation to check whether the negotiated workspace actually exists in the storage.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The HTTP request.

Return value

\Drupal\workspaces\WorkspaceInterface|null The negotiated workspace or NULL if the negotiator could not determine a valid workspace.

2 methods override WorkspaceNegotiatorInterface::getActiveWorkspace()
SessionWorkspaceNegotiator::getActiveWorkspace in core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php
Gets the negotiated workspace, if any.
TestWorkspaceNegotiator::getActiveWorkspace in core/modules/workspaces/tests/modules/workspace_update_test/src/Negotiator/TestWorkspaceNegotiator.php
Gets the negotiated workspace, if any.

File

core/modules/workspaces/src/Negotiator/WorkspaceNegotiatorInterface.php, line 40

Class

WorkspaceNegotiatorInterface
Workspace negotiators provide a way to get the active workspace.

Namespace

Drupal\workspaces\Negotiator

Code

public function getActiveWorkspace(Request $request);