You are here

public function SearchApiViewsHandlerFilterOptions::operator_options in Search API 7

Provide a list of options for the operator form.

Overrides SearchApiViewsHandlerFilter::operator_options

1 call to SearchApiViewsHandlerFilterOptions::operator_options()
SearchApiViewsHandlerFilterOptions::admin_summary in contrib/search_api_views/includes/handler_filter_options.inc
Provides a summary of this filter's value for the admin UI.

File

contrib/search_api_views/includes/handler_filter_options.inc, line 83
Contains the SearchApiViewsHandlerFilterOptions class.

Class

SearchApiViewsHandlerFilterOptions
Views filter handler for fields with a limited set of possible values.

Code

public function operator_options() {
  $options = array(
    '=' => t('Is one of'),
    'all of' => t('Is all of'),
    '<>' => t('Is none of'),
    'empty' => t('Is empty'),
    'not empty' => t('Is not empty'),
  );

  // "Is all of" doesn't make sense for single-valued fields.
  if (empty($this->definition['multi-valued'])) {
    unset($options['all of']);
  }
  return $options;
}