You are here

public function WorkspaceAssociationStorage::postPush in Workspace 8.2

Triggers clean-up operations after pushing.

Parameters

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

Overrides WorkspaceAssociationStorageInterface::postPush

File

src/WorkspaceAssociationStorage.php, line 16

Class

WorkspaceAssociationStorage
Defines the storage handler class for the Workspace association entity type.

Namespace

Drupal\workspace

Code

public function postPush(WorkspaceInterface $workspace) {
  $this->database
    ->delete($this->entityType
    ->getBaseTable())
    ->condition('workspace', $workspace
    ->id())
    ->execute();
  $this->database
    ->delete($this->entityType
    ->getRevisionTable())
    ->condition('workspace', $workspace
    ->id())
    ->execute();
}