You are here

function FieldList::getValueOptions in EntityFieldQuery Views Backend 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

File

src/Plugin/views/filter/FieldList.php, line 23
Contains \Drupal\efq_views\Plugin\views\filter\FieldList.

Class

FieldList
Filter handler which uses list-fields as options.

Namespace

Drupal\efq_views\Plugin\views\filter

Code

function getValueOptions() {
  $field = field_info_field($this->definition['field_name']);
  $this->valueOptions = list_allowed_values($field);
}