function RelationshipPluginBase::calculateDependencies

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

Overrides HandlerBase::calculateDependencies

1 call to RelationshipPluginBase::calculateDependencies()
NodeTermData::calculateDependencies in core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php
Calculates dependencies for the configured plugin.
1 method overrides RelationshipPluginBase::calculateDependencies()
NodeTermData::calculateDependencies in core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php
Calculates dependencies for the configured plugin.

File

core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php, line 175

Class

RelationshipPluginBase
Simple relationship handler that allows a new version of the primary table to be linked in.

Namespace

Drupal\views\Plugin\views\relationship

Code

public function calculateDependencies() {
    $dependencies = parent::calculateDependencies();
    // Add the provider of the relationship's base table to the dependencies.
    $table_data = $this->getViewsData()
        ->get($this->definition['base']);
    $dependencies['module'][] = $table_data['table']['provider'];
    return $dependencies;
}

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