QueryParameterWorkspaceNegotiator
class QueryParameterWorkspaceNegotiator extends SessionWorkspaceNegotiator (View source)
Defines the query parameter workspace negotiator.
Properties
| protected AccountInterface | $currentUser | The current user. |
from SessionWorkspaceNegotiator |
| protected Session | $session | The session. |
from SessionWorkspaceNegotiator |
| protected EntityStorageInterface | $workspaceStorage | The workspace storage handler. |
from SessionWorkspaceNegotiator |
Methods
__construct(AccountInterface $current_user, Session $session, EntityTypeManagerInterface $entity_type_manager)
Constructor.
bool
applies(Request $request)
Checks whether the negotiator applies to the current request or not.
WorkspaceInterface|null
getActiveWorkspace(Request $request)
Gets the negotiated workspace, if any.
Details
__construct(AccountInterface $current_user, Session $session, EntityTypeManagerInterface $entity_type_manager)
Constructor.
bool
applies(Request $request)
Checks whether the negotiator applies to the current request or not.
WorkspaceInterface|null
getActiveWorkspace(Request $request)
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.
setActiveWorkspace(WorkspaceInterface $workspace)
Sets the negotiated workspace.
unsetActiveWorkspace()
Unsets the negotiated workspace.