You are here

public function SessionWorkspaceNegotiator::getWorkspaceId in Multiversion 8

Parameters

\Symfony\Component\HttpFoundation\Request $request:

Return value

string

Overrides WorkspaceNegotiatorInterface::getWorkspaceId

File

src/Workspace/SessionWorkspaceNegotiator.php, line 37

Class

SessionWorkspaceNegotiator

Namespace

Drupal\multiversion\Workspace

Code

public function getWorkspaceId(Request $request) {
  $workspace_id = $this->tempstore
    ->get('active_workspace_id');
  return $workspace_id ?: $this->container
    ->getParameter('workspace.default');
}