function LanguageFilter::getValueOptions

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/filter/LanguageFilter.php \Drupal\views\Plugin\views\filter\LanguageFilter::getValueOptions()
  2. 10 core/modules/views/src/Plugin/views/filter/LanguageFilter.php \Drupal\views\Plugin\views\filter\LanguageFilter::getValueOptions()
  3. 11.x core/modules/views/src/Plugin/views/filter/LanguageFilter.php \Drupal\views\Plugin\views\filter\LanguageFilter::getValueOptions()

Overrides InOperator::getValueOptions

File

core/modules/views/src/Plugin/views/filter/LanguageFilter.php, line 60

Class

LanguageFilter
Provides filtering by language.

Namespace

Drupal\views\Plugin\views\filter

Code

public function getValueOptions() {
    if (!isset($this->valueOptions)) {
        $this->valueTitle = $this->t('Language');
        // Pass the current values so options that are already selected do not get
        // lost when there are changes in the language configuration.
        $this->valueOptions = $this->listLanguages(LanguageInterface::STATE_ALL | LanguageInterface::STATE_SITE_DEFAULT | PluginBase::INCLUDE_NEGOTIATED, array_keys($this->value));
    }
    return $this->valueOptions;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.