You are here

search_file_attachments.module in Search File Attachments 8

Same filename and directory in other branches
  1. 7 search_file_attachments.module

File

search_file_attachments.module
View source
<?php

/**
 * Implements hook_ENTITY_TYPE_predelete() for file entities.
 *
 * @param \Drupal\Core\Entity\EntityInterface $entity
 */
function search_file_attachments_file_predelete(Drupal\Core\Entity\EntityInterface $entity) {

  // Ensure that all files deleted are removed from the search index.
  search_index_clear('file_search', $entity
    ->id());
}

Functions

Namesort descending Description
search_file_attachments_file_predelete Implements hook_ENTITY_TYPE_predelete() for file entities.