You are here

function search_api_server_load_multiple in Search API 7

Load multiple servers at once, determined by IDs or machine names, or by other conditions.

Parameters

array|false $ids: An array of server IDs or machine names, or FALSE to load all servers.

array $conditions: An array of conditions on the {search_api_server} table in the form 'field' => $value.

bool $reset: Whether to reset the internal entity_load cache.

Return value

SearchApiServer[] An array of server objects keyed by machine name.

See also

entity_load()

7 calls to search_api_server_load_multiple()
drush_search_api_server_list in ./search_api.drush.inc
Lists all search servers.
search_api_admin_add_index in ./search_api.admin.inc
Form constructor for adding an index.
search_api_admin_index_edit in ./search_api.admin.inc
Form constructor for editing an index's settings.
search_api_admin_overview in ./search_api.admin.inc
Page callback that shows an overview of defined servers and indexes.
search_api_drush_get_server in ./search_api.drush.inc
Returns a server or all servers as an array.

... See full list

File

./search_api.module, line 2626
Provides a flexible framework for implementing search services.

Code

function search_api_server_load_multiple($ids = array(), $conditions = array(), $reset = FALSE) {
  $servers = entity_load('search_api_server', $ids, $conditions, $reset);
  return entity_key_array_by_property($servers, 'machine_name');
}