function View::calculateDependencies
Same name in this branch
- 10 core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::calculateDependencies()
Same name in other branches
- 9 core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::calculateDependencies()
- 9 core/modules/views/src/Plugin/views/area/View.php \Drupal\views\Plugin\views\area\View::calculateDependencies()
- 8.9.x core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::calculateDependencies()
- 8.9.x core/modules/views/src/Plugin/views/area/View.php \Drupal\views\Plugin\views\area\View::calculateDependencies()
- 11.x core/modules/views/src/Entity/View.php \Drupal\views\Entity\View::calculateDependencies()
- 11.x core/modules/views/src/Plugin/views/area/View.php \Drupal\views\Plugin\views\area\View::calculateDependencies()
Overrides HandlerBase::calculateDependencies
File
-
core/
modules/ views/ src/ Plugin/ views/ area/ View.php, line 152
Class
- View
- Views area handlers. Insert a view inside of an area.
Namespace
Drupal\views\Plugin\views\areaCode
public function calculateDependencies() {
$dependencies = parent::calculateDependencies();
[
$view_id,
] = explode(':', $this->options['view_to_insert'], 2);
// Don't call the current view, as it would result into an infinite recursion.
if ($view_id && $this->view->storage
->id() != $view_id) {
$view = $this->viewStorage
->load($view_id);
$dependencies[$view->getConfigDependencyKey()][] = $view->getConfigDependencyName();
}
return $dependencies;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.