You are here

function hook_search_api_index_delete in Search API 7

A search index was deleted.

Parameters

SearchApiIndex $index: The deleted index.

2 functions implement hook_search_api_index_delete()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

search_api_search_api_index_delete in ./search_api.module
Implements hook_search_api_index_delete().
search_api_views_search_api_index_delete in contrib/search_api_views/search_api_views.module
Implements hook_search_api_index_delete().

File

./search_api.api.php, line 536
Hooks provided by the Search API module.

Code

function hook_search_api_index_delete(SearchApiIndex $index) {
  db_insert('example_search_index_update')
    ->fields(array(
    'index' => $index->machine_name,
    'update_time' => REQUEST_TIME,
  ))
    ->execute();
  db_delete('example_search_index')
    ->condition('index', $index->machine_name)
    ->execute();
}