public function FieldList::getValueOptions

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

Return the stored values in $this->value_options if someone expects it.

Overrides InOperator::getValueOptions

File

drupal/core/modules/field/lib/Drupal/field/Plugin/views/filter/FieldList.php, line 22
Definition of Drupal\field\Plugin\views\filter\FieldList.

Class

FieldList
Filter handler which uses list-fields as options.

Namespace

Drupal\field\Plugin\views\filter

Code

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