You are here

public function Workspace::publish in Drupal 9

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

Publishes the contents of this workspace to the default (Live) workspace.

Overrides WorkspaceInterface::publish

File

core/modules/workspaces/src/Entity/Workspace.php, line 129

Class

Workspace
The workspace entity class.

Namespace

Drupal\workspaces\Entity

Code

public function publish() {
  return \Drupal::service('workspaces.operation_factory')
    ->getPublisher($this)
    ->publish();
}