function search_api_live_results_get_types in Search API live results 7
Get information about all search types, or a specific one.
Parameters
$type: (optional) The name of a type.
Return value
If $type was not given, an array containing information about all search types. Otherwise, either information about the specified type, or NULL if the type is not known.
See also
hook_search_api_autocomplete_types()
3 calls to search_api_live_results_get_types()
- SearchApiLiveResultsSearch::getQuery in ./
search_api_live_results.module - Create the query that would be issued for this search for the complete keys.
- search_api_live_results_admin_overview in includes/
search_api_live_results.admin.inc - Form displaying an overview over all searches available for autocompletion.
- search_api_live_results_admin_search_edit in includes/
search_api_live_results.admin.inc - Form for editing the autocompletion settings for a search.
File
- ./
search_api_live_results.module, line 239
Code
function search_api_live_results_get_types($type = NULL) {
$types =& drupal_static(__FUNCTION__);
if (!isset($types)) {
$types = module_invoke_all('search_api_live_results_types');
drupal_alter('search_api_live_results_types', $types);
}
if (isset($type)) {
return isset($types[$type]) ? $types[$type] : NULL;
}
return $types;
}