function ConfigDependencyManager::updateData

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

Updates one of the lightweight ConfigEntityDependency objects.

Parameters

$name: The configuration dependency name.

array $dependencies: The configuration dependencies. The array is structured like this:

array(
    'config' => array(),
    'content' => array(),
    'module' => array(),
    'theme' => array(),
);

Return value

$this

File

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

Class

ConfigDependencyManager
Provides a class to discover configuration entity dependencies.

Namespace

Drupal\Core\Config\Entity

Code

public function updateData($name, array $dependencies) {
    $this->graph = NULL;
    $this->data[$name] = new ConfigEntityDependency($name, [
        'dependencies' => $dependencies,
    ]);
    return $this;
}

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