You are here

function filehash_file_delete in File Hash 8

Same name and namespace in other branches
  1. 7 filehash.module \filehash_file_delete()

Implements hook_ENTITY_TYPE_delete().

File

./filehash.module, line 46
Generate hashes for each uploaded file.

Code

function filehash_file_delete(EntityInterface $file) {
  \Drupal::database()
    ->delete('filehash')
    ->condition('fid', $file
    ->id())
    ->execute();
}