You are here

public function SearchApiViewsHandlerFilterEntity::operator_options in Search API 7

Provide a list of options for the operator form.

Overrides SearchApiViewsHandlerFilter::operator_options

File

contrib/search_api_views/includes/handler_filter_entity.inc, line 56
Contains SearchApiViewsHandlerFilterEntity.

Class

SearchApiViewsHandlerFilterEntity
Views filter handler class for entities.

Code

public function operator_options() {
  $operators = array(
    '=' => $this
      ->isMultiValued() ? t('Is one of') : t('Is'),
    'all of' => t('Is all of'),
    '<>' => $this
      ->isMultiValued() ? t('Is not one of') : t('Is not'),
    'empty' => t('Is empty'),
    'not empty' => t('Is not empty'),
  );
  if (!$this
    ->isMultiValued()) {
    unset($operators['all of']);
  }
  return $operators;
}