You are here

function current_search_export_crud_delete in Facet API 7

Same name and namespace in other branches
  1. 6.3 contrib/current_search/current_search.current_search.inc \current_search_export_crud_delete()
  2. 7.2 contrib/current_search/current_search.current_search.inc \current_search_export_crud_delete()

Deletes object and block visibility information from the database.

Parameters

stdClass $object: The object being deleted.

1 string reference to 'current_search_export_crud_delete'
current_search_schema in contrib/current_search/current_search.install
Implements hook_schema().

File

contrib/current_search/current_search.current_search.inc, line 14
Current Search default hooks.

Code

function current_search_export_crud_delete($object) {

  // Deletes the current search block configuration.
  db_delete('current_search')
    ->condition('name', $object->name)
    ->execute();

  // Only deletes the association with the searcher if we are not reverting a
  // configuration setting.
  if (!($object->export_type & EXPORT_IN_CODE && $object->export_type & EXPORT_IN_DATABASE)) {
    db_delete('block_current_search')
      ->condition('delta', $object->name)
      ->execute();
  }
}