You are here

public function WorkspaceManager::switchToLive in Drupal 9

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

Unsets the active workspace via the workspace negotiators.

Return value

$this

Overrides WorkspaceManagerInterface::switchToLive

File

core/modules/workspaces/src/WorkspaceManager.php, line 219

Class

WorkspaceManager
Provides the workspace manager.

Namespace

Drupal\workspaces

Code

public function switchToLive() {
  $this
    ->doSwitchWorkspace(NULL);

  // Unset the active workspace on all negotiators.
  foreach ($this->negotiatorIds as $negotiator_id) {
    $negotiator = $this->classResolver
      ->getInstanceFromDefinition($negotiator_id);
    $negotiator
      ->unsetActiveWorkspace();
  }
  return $this;
}