protected function SubscriberAudit::deleteEntity in Acquia Content Hub 8
Deletes a single entity.
Parameters
string $uuid: The entity UUID.
string $entity_type: The entity type.
2 calls to SubscriberAudit::deleteEntity()
- SubscriberAudit::deleteEntities in acquia_contenthub_audit/
src/ SubscriberAudit.php - Delete Entities.
- SubscriberAudit::executeManifest in acquia_contenthub_audit/
src/ SubscriberAudit.php - Executes a Manifest file.
File
- acquia_contenthub_audit/
src/ SubscriberAudit.php, line 413
Class
- SubscriberAudit
- Audits Subscribers.
Namespace
Drupal\acquia_contenthub_auditCode
protected function deleteEntity($uuid, $entity_type) {
$local_entity = $this->entityRepository
->loadEntityByUuid($entity_type, $uuid);
if ($local_entity) {
$event = new AuditPreEntityDeleteEvent($local_entity);
$this->dispatcher
->dispatch(AcquiaContentHubAuditEvents::PRE_ENTITY_DELETE, $event);
$local_entity
->delete();
}
else {
$this
->deleteTrackingEntity($uuid, $entity_type);
}
}