You are here

public function TaxonomyIndexTid::calculateDependencies in Drupal 10

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

File

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

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;
}