function ConfigDependencyManager::setData

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php \Drupal\Core\Config\Entity\ConfigDependencyManager::setData()
  2. 10 core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php \Drupal\Core\Config\Entity\ConfigDependencyManager::setData()
  3. 11.x core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php \Drupal\Core\Config\Entity\ConfigDependencyManager::setData()

Sets data to calculate dependencies for.

The data is converted into lightweight ConfigEntityDependency objects.

Parameters

array $data: Configuration data keyed by configuration object name. Typically the output of \Drupal\Core\Config\StorageInterface::loadMultiple().

Return value

$this

File

core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php, line 291

Class

ConfigDependencyManager
Provides a class to discover configuration entity dependencies.

Namespace

Drupal\Core\Config\Entity

Code

public function setData(array $data) {
    array_walk($data, function (&$config, $name) {
        $config = new ConfigEntityDependency($name, $config);
    });
    $this->data = $data;
    $this->graph = NULL;
    return $this;
}

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