function ConfigManager::getConfigDependencyManager

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Config/ConfigManager.php \Drupal\Core\Config\ConfigManager::getConfigDependencyManager()
  2. 10 core/lib/Drupal/Core/Config/ConfigManager.php \Drupal\Core\Config\ConfigManager::getConfigDependencyManager()
  3. 11.x core/lib/Drupal/Core/Config/ConfigManager.php \Drupal\Core\Config\ConfigManager::getConfigDependencyManager()

Overrides ConfigManagerInterface::getConfigDependencyManager

2 calls to ConfigManager::getConfigDependencyManager()
ConfigManager::findConfigEntityDependents in core/lib/Drupal/Core/Config/ConfigManager.php
Finds config entities that are dependent on extensions or entities.
ConfigManager::getConfigEntitiesToChangeOnDependencyRemoval in core/lib/Drupal/Core/Config/ConfigManager.php
Lists which config entities to update and delete on removal of a dependency.

File

core/lib/Drupal/Core/Config/ConfigManager.php, line 252

Class

ConfigManager
The ConfigManager provides helper functions for the configuration system.

Namespace

Drupal\Core\Config

Code

public function getConfigDependencyManager() {
    $dependency_manager = new ConfigDependencyManager();
    // Read all configuration using the factory. This ensures that multiple
    // deletes during the same request benefit from the static cache. Using the
    // factory also ensures configuration entity dependency discovery has no
    // dependencies on the config entity classes. Assume data with UUID is a
    // config entity. Only configuration entities can be depended on so we can
    // ignore everything else.
    $data = array_map(function ($config) {
        $data = $config->get();
        if (isset($data['uuid'])) {
            return $data;
        }
        return FALSE;
    }, $this->configFactory
        ->loadMultiple($this->activeStorage
        ->listAll()));
    $dependency_manager->setData(array_filter($data));
    return $dependency_manager;
}

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