You are here

function hook_search_api_server_delete in Search API 7

A search server was deleted.

Parameters

SearchApiServer $server: The deleted server.

1 function implements hook_search_api_server_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_server_delete in ./search_api.module
Implements hook_search_api_server_delete().

File

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

Code

function hook_search_api_server_delete(SearchApiServer $server) {
  db_insert('example_search_server_update')
    ->fields(array(
    'server' => $server->machine_name,
    'update_time' => REQUEST_TIME,
  ))
    ->execute();
  db_delete('example_search_server')
    ->condition('server', $server->machine_name)
    ->execute();
}