function WorkspaceSwitchEvent::getWorkspace

Same name and namespace in other branches
  1. 11.x core/modules/workspaces/src/Event/WorkspaceSwitchEvent.php \Drupal\workspaces\Event\WorkspaceSwitchEvent::getWorkspace()

Gets the new activate workspace.

Return value

\Drupal\workspaces\WorkspaceInterface|null A workspace entity, or NULL if we switched into Live.

File

core/modules/workspaces/src/Event/WorkspaceSwitchEvent.php, line 24

Class

WorkspaceSwitchEvent
Defines the workspace switch event.

Namespace

Drupal\workspaces\Event

Code

public function getWorkspace() : ?WorkspaceInterface {
  return $this->workspace;
}

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