You are here

public function SearchApiOptions::getValueOptions in Search API 8

Child classes should be used to override this function and set the 'value options', unless 'options callback' is defined as a valid function or static public method to generate these values.

This can use a guard to be used to reduce database hits as much as possible.

Return value

array|null The stored values from $this->valueOptions.

Overrides InOperator::getValueOptions

1 method overrides SearchApiOptions::getValueOptions()
SearchApiDatasource::getValueOptions in src/Plugin/views/filter/SearchApiDatasource.php
Child classes should be used to override this function and set the 'value options', unless 'options callback' is defined as a valid function or static public method to generate these values.

File

src/Plugin/views/filter/SearchApiOptions.php, line 31

Class

SearchApiOptions
Defines a filter for filtering on fields with a fixed set of possible values.

Namespace

Drupal\search_api\Plugin\views\filter

Code

public function getValueOptions() {
  parent::getValueOptions();
  if ($this->valueOptions === NULL) {
    $this->valueOptions = [];
  }
  return $this->valueOptions;
}