function HandlerBase::calculateDependencies

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

File

core/modules/views/src/Plugin/views/HandlerBase.php, line 871

Class

HandlerBase
Base class for Views handler plugins.

Namespace

Drupal\views\Plugin\views

Code

public function calculateDependencies() {
  $dependencies = parent::calculateDependencies();
  if ($this->table) {
    // Ensure that the view depends on the module that provides the table.
    $data = $this->getViewsData()
      ->get($this->table);
    if (isset($data['table']['provider'])) {
      $dependencies['module'][] = $data['table']['provider'];
    }
  }
  return $dependencies;
}

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