protected function AcsfDuplicationScrubEntityHandler::deleteEntities in Acquia Cloud Site Factory Connector 8.2
Same name and namespace in other branches
- 8 src/Event/AcsfDuplicationScrubEntityHandler.php \Drupal\acsf\Event\AcsfDuplicationScrubEntityHandler::deleteEntities()
Deletes entities.
Parameters
array $entities: The entities to delete.
1 call to AcsfDuplicationScrubEntityHandler::deleteEntities()
- AcsfDuplicationScrubEntityHandler::handle in src/
Event/ AcsfDuplicationScrubEntityHandler.php - Implements AcsfEventHandler::handle().
1 method overrides AcsfDuplicationScrubEntityHandler::deleteEntities()
- AcsfDuplicationScrubUserHandler::deleteEntities in src/
Event/ AcsfDuplicationScrubUserHandler.php - Deletes entities.
File
- src/
Event/ AcsfDuplicationScrubEntityHandler.php, line 123
Class
- AcsfDuplicationScrubEntityHandler
- Handles the scrubbing of Drupal entities.
Namespace
Drupal\acsf\EventCode
protected function deleteEntities(array $entities) {
// Delete the entities one by one. This may be slower than mass deleting
// them, but this way we can catch an exception without a mass delete
// being fully rolled back.
foreach ($entities as $entity) {
try {
$entity
->delete();
} catch (\Exception $e) {
// OK, we'll live with not scrubbing this.
}
}
}