function WorkspaceSwitchEvent::getPreviousWorkspace
Gets the previous active workspace.
Return value
\Drupal\workspaces\WorkspaceInterface|null A workspace entity, or NULL if we switched from Live.
File
-
core/
modules/ workspaces/ src/ Event/ WorkspaceSwitchEvent.php, line 34
Class
- WorkspaceSwitchEvent
- Defines the workspace switch event.
Namespace
Drupal\workspaces\EventCode
public function getPreviousWorkspace() : ?WorkspaceInterface {
return $this->previousWorkspace;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.