You are here

function sarnia_index_get_options in Sarnia 7

Same name in this branch
  1. 7 sarnia.api.php \sarnia_index_get_options()
  2. 7 sarnia.module \sarnia_index_get_options()

Get a list of Solr fields for a particular Search API index.

Parameters

$index_machine_name: String. The machine name of a Search API index.

$filter_method: NULL or string. If a string, the method of that name will be called on an instance of the SolrField class for each possible field. Especially useful are the values 'isPossibleKey', 'isSortable', and 'isIndexed'.

Return value

An array of Solr fields, where the keys are Solr field names and the values are field labels. This array is suitable for use as a Forms API #options property.

3 calls to sarnia_index_get_options()
SarniaViewsHandlerSort::options_form in handlers/handler_sort.inc
Basic options for all sort criteria
sarnia_index_get_field_options in ./sarnia.module
Get and cache a list of retrievable fields for a particular Search API index.
sarnia_index_get_filter_options in ./sarnia.module
Get and cache a list of filterable fields for a particular Search API index.

File

./sarnia.api.php, line 29
A summary of API functions.

Code

function sarnia_index_get_options($index_machine_name, $filter_method = NULL, $reset = FALSE) {

  /* ... */
}