You are here

public function CronWorkspaceNegotiator::getWorkspaceId in Multiversion 8

Parameters

\Symfony\Component\HttpFoundation\Request $request:

Return value

string

Overrides WorkspaceNegotiatorInterface::getWorkspaceId

File

src/Workspace/CronWorkspaceNegotiator.php, line 38

Class

CronWorkspaceNegotiator

Namespace

Drupal\multiversion\Workspace

Code

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