function NodeTermData::calculateDependencies

Same name in other branches
  1. 9 core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php \Drupal\taxonomy\Plugin\views\relationship\NodeTermData::calculateDependencies()
  2. 8.9.x core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php \Drupal\taxonomy\Plugin\views\relationship\NodeTermData::calculateDependencies()
  3. 11.x 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;
}

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