W3cubDocs

/Drupal 8

public function ConfigManager::getConfigDependencyManager

public ConfigManager::getConfigDependencyManager()

Creates and populates a ConfigDependencyManager object.

The configuration dependency manager is populated with data from the active store.

Return value

\Drupal\Core\Config\Entity\ConfigDependencyManager

Overrides ConfigManagerInterface::getConfigDependencyManager

File

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

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;
}

© 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!ConfigManager.php/function/ConfigManager::getConfigDependencyManager/8.1.x