public ConfigEntityBase::calculateDependencies()
Calculates dependencies and stores them in the dependency property.
$this
Overrides ConfigEntityInterface::calculateDependencies
\Drupal\Core\Config\Entity\ConfigDependencyManager
public function calculateDependencies() { // All dependencies should be recalculated on every save apart from enforced // dependencies. This ensures stale dependencies are never saved. $this->dependencies = array_intersect_key($this->dependencies, ['enforced' => '']); if ($this instanceof EntityWithPluginCollectionInterface) { // Configuration entities need to depend on the providers of any plugins // that they store the configuration for. foreach ($this->getPluginCollections() as $plugin_collection) { foreach ($plugin_collection as $instance) { $this->calculatePluginDependencies($instance); } } } if ($this instanceof ThirdPartySettingsInterface) { // Configuration entities need to depend on the providers of any third // parties that they store the configuration for. foreach ($this->getThirdPartyProviders() as $provider) { $this->addDependency('module', $provider); } } return $this; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!Entity!ConfigEntityBase.php/function/ConfigEntityBase::calculateDependencies/8.1.x