You are here

public function WorkspaceAssociation::postPublish in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/workspaces/src/WorkspaceAssociation.php \Drupal\workspaces\WorkspaceAssociation::postPublish()
  2. 10 core/modules/workspaces/src/WorkspaceAssociation.php \Drupal\workspaces\WorkspaceAssociation::postPublish()

Triggers clean-up operations after publishing a workspace.

Parameters

\Drupal\workspaces\WorkspaceInterface $workspace: A workspace entity.

Overrides WorkspaceAssociationInterface::postPublish

File

core/modules/workspaces/src/WorkspaceAssociation.php, line 208

Class

WorkspaceAssociation
Provides a class for CRUD operations on workspace associations.

Namespace

Drupal\workspaces

Code

public function postPublish(WorkspaceInterface $workspace) {
  $this
    ->deleteAssociations($workspace
    ->id());
}