function WorkspaceAssociation::onPostPublish

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

Triggers clean-up operations after a workspace is published.

Parameters

\Drupal\workspaces\Event\WorkspacePublishEvent $event: The workspace publish event.

File

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

Class

WorkspaceAssociation
Provides a class for CRUD operations on workspace associations.

Namespace

Drupal\workspaces

Code

public function onPostPublish(WorkspacePublishEvent $event) : void {
    $this->deleteAssociations($event->getWorkspace()
        ->id());
}

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