You are here

function hook_search_api_server_update in Search API 7

A search server was edited, enabled or disabled.

Parameters

SearchApiServer $server: The edited server.

1 function implements hook_search_api_server_update()

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_update in ./search_api.module
Implements hook_search_api_server_update().

File

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

Code

function hook_search_api_server_update(SearchApiServer $server) {
  if ($server->name != $server->original->name) {
    db_insert('example_search_server_name_update')
      ->fields(array(
      'server' => $server->machine_name,
      'update_time' => REQUEST_TIME,
    ))
      ->execute();
  }
}