function search_api_saved_searches_search_api_index_delete in Search API Saved Searches 7
Same name and namespace in other branches
- 8 search_api_saved_searches.module \search_api_saved_searches_search_api_index_delete()
Implements hook_search_api_index_delete().
Deletes the settings associated with a search index.
File
- ./
search_api_saved_searches.module, line 387 - Offers the ability to save searches and be notified of new results.
Code
function search_api_saved_searches_search_api_index_delete(SearchApiIndex $index) {
// Only react on real delete, not revert.
if ($index->status & ENTITY_IN_CODE) {
return;
}
foreach (search_api_saved_searches_settings_load_multiple(FALSE, array(
'index_id' => $index->machine_name,
)) as $settings) {
$settings
->delete();
}
}