You are here

public function NodeTermData::calculateDependencies in Drupal 10

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

Overrides RelationshipPluginBase::calculateDependencies

File

core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php, line 135

Class

NodeTermData
Relationship handler to return the taxonomy terms of nodes.

Namespace

Drupal\taxonomy\Plugin\views\relationship

Code

public function calculateDependencies() {
  $dependencies = parent::calculateDependencies();
  foreach ($this->options['vids'] as $vocabulary_id) {
    if ($vocabulary = $this->vocabularyStorage
      ->load($vocabulary_id)) {
      $dependencies[$vocabulary
        ->getConfigDependencyKey()][] = $vocabulary
        ->getConfigDependencyName();
    }
  }
  return $dependencies;
}