function acquia_contenthub_s3_file_delete in Acquia Content Hub 8.2
Implements hook_ENTITY_TYPE_delete().
File
- modules/
acquia_contenthub_s3/ acquia_contenthub_s3.module, line 17 - Drupal Module: Acquia Content Hub S3.
Code
function acquia_contenthub_s3_file_delete(EntityInterface $entity) {
$file_map = \Drupal::getContainer()
->get('acquia_contenthub_s3.file_map');
$uuid = $entity
->uuid();
$tracked_file = $file_map
->getFileByUuid($uuid);
if ($tracked_file) {
$file_map
->remove($uuid);
}
}