function TaxonomyIndexTid::calculateDependencies

Same name and namespace in other branches
  1. 9 core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php \Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid::calculateDependencies()
  2. 8.9.x core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php \Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid::calculateDependencies()
  3. 10 core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php \Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid::calculateDependencies()

Overrides HandlerBase::calculateDependencies

File

core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php, line 407

Class

TaxonomyIndexTid
Filter by term id.

Namespace

Drupal\taxonomy\Plugin\views\filter

Code

public function calculateDependencies() {
    $dependencies = parent::calculateDependencies();
    $vocabulary = $this->vocabularyStorage
        ->load($this->options['vid']);
    $dependencies[$vocabulary->getConfigDependencyKey()][] = $vocabulary->getConfigDependencyName();
    foreach ($this->termStorage
        ->loadMultiple($this->options['value']) as $term) {
        $dependencies[$term->getConfigDependencyKey()][] = $term->getConfigDependencyName();
    }
    return $dependencies;
}

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