diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php b/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php index df5e52d..92a28e6 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php @@ -42,20 +42,28 @@ * ); * * - * Classes for configuration entities with dependencies normally extend - * \Drupal\Core\Config\Entity\ConfigEntityBase to manage dependencies. If the - * configuration entity has dependencies that cannot be discovered by - * \Drupal\Core\Config\Entity\ConfigEntityBase::calculateDependencies() then it - * needs to implement + * Configuration entity dependencies are recalculated on save based on the state + * of the configuration. For example, a filter format will depend on the modules + * that provide the filter plugins it configures. The filter format can be + * reconfigured to use a different filter plugin provided by another module. If + * this occurs, the dependencies will be recalculated on save and the old module + * will be removed from the list of dependencies and replaced with the new one. + * + * Configuration entity classes usually extend + * \Drupal\Core\Config\Entity\ConfigEntityBase. The base class provides a + * generic implementation of the calculateDependencies() method that can + * discover dependencies due to enforced dependencies, plugins, and third party + * settings. If the configuration entity has dependencies that cannot be + * discovered by the base class's implementation then it needs to implement * \Drupal\Core\Config\Entity\ConfigEntityInterface::calculateDependencies() to * calculate (and return) the dependencies. In this method, use * \Drupal\Core\Config\Entity\ConfigEntityBase::addDependency() to add - * dependencies. Implementations should call - * \Drupal\Core\Config\Entity\ConfigEntityBase::calculateDependencies() since it - * provides a generic implementation that will discover dependencies due to - * enforced dependencies, plugins, and third party settings. To get a - * configuration entity's current dependencies without forcing a recalculation - * use \Drupal\Core\Config\Entity\ConfigEntityInterface::getDependencies(). + * dependencies. Implementations should call the base class implementation to + * inherit the generic functionality. + * + * To get a configuration entity's current dependencies without forcing a + * recalculation use + * \Drupal\Core\Config\Entity\ConfigEntityInterface::getDependencies(). * * Classes for configurable plugins are a special case. They can either declare * their configuration dependencies using the calculateDependencies() method @@ -64,9 +72,12 @@ * * If an extension author wants a configuration entity to depend on something * that is not calculable then they can add these dependencies to the enforced - * dependencies key. For example, the forum module provides the forum node type + * dependencies key. For example, the Forum module provides the forum node type * and in order for it to be deleted when the forum module is uninstalled it has - * an enforced dependency on the module. + * an enforced dependency on the module. The dependency on the Forum module can + * not be calculated since there is nothing inherent in the state of the node + * type configuration entity that depends on functionality provided by the Forum + * module. * * Once declared properly, dependencies are saved to the configuration entity's * configuration object so that they can be checked without the module that