You are here

public function PropertyTaxonomyVocabulary::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/PropertyTaxonomyVocabulary.php, line 25
Contains \Drupal\efq_views\Plugin\views\filter\PropertyTaxonomyVocabulary.

Class

PropertyTaxonomyVocabulary
Handle matching of multiple options selectable via checkboxes.

Namespace

Drupal\efq_views\Plugin\views\filter

Code

public function getValueOptions() {
  $vocabularies = Vocabulary::loadMultiple();
  $options = array();
  foreach ($vocabularies as $vocabulary) {
    $options[$vocabulary->vid] = String::checkPlain($vocabulary->name);
  }
  $this->valueOptions = $options;
  return $options;
}