function SessionWorkspaceNegotiator::getActiveWorkspaceId

Performs workspace negotiation.

Parameters

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

Return value

string|null A valid workspace ID if the negotiation was successful, NULL otherwise.

Overrides WorkspaceIdNegotiatorInterface::getActiveWorkspaceId

1 method overrides SessionWorkspaceNegotiator::getActiveWorkspaceId()
QueryParameterWorkspaceNegotiator::getActiveWorkspaceId in core/modules/workspaces/src/Negotiator/QueryParameterWorkspaceNegotiator.php
Performs workspace negotiation.

File

core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php, line 31

Class

SessionWorkspaceNegotiator
Defines the session workspace negotiator.

Namespace

Drupal\workspaces\Negotiator

Code

public function getActiveWorkspaceId(Request $request) : ?string {
  return $this->session
    ->get('active_workspace_id');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.