function View::calculateDependencies
Overrides ConfigEntityBase::calculateDependencies
1 call to View::calculateDependencies()
- View::onDependencyRemoval in core/
modules/ views/ src/ Entity/ View.php - Informs the entity that entities it depends on will be deleted.
File
-
core/
modules/ views/ src/ Entity/ View.php, line 271
Class
- View
- Defines a View configuration entity class.
Namespace
Drupal\views\EntityCode
public function calculateDependencies() {
parent::calculateDependencies();
// Ensure that the view is dependant on the module that implements the view.
$this->addDependency('module', $this->module);
$executable = $this->getExecutable();
$executable->initDisplay();
$executable->initStyle();
foreach ($executable->displayHandlers as $display) {
// Calculate the dependencies each display has.
$this->calculatePluginDependencies($display);
}
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.