You are here

public function ExportManager::onEntityDelete in Content Synchronizer 8.2

Same name and namespace in other branches
  1. 8 src/Service/ExportManager.php \Drupal\content_synchronizer\Service\ExportManager::onEntityDelete()
  2. 3.x src/Service/ExportManager.php \Drupal\content_synchronizer\Service\ExportManager::onEntityDelete()

Action after delete entity.

File

src/Service/ExportManager.php, line 55

Class

ExportManager
The export manager.

Namespace

Drupal\content_synchronizer\Service

Code

public function onEntityDelete(EntityInterface $entity) {
  foreach ($this
    ->getEntitiesExport($entity) as $export) {
    $export
      ->removeEntity($entity);
  }
}