function ConfigDependencyManager::createGraphConfigEntityDependencies
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php \Drupal\Core\Config\Entity\ConfigDependencyManager::createGraphConfigEntityDependencies()
- 10 core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php \Drupal\Core\Config\Entity\ConfigDependencyManager::createGraphConfigEntityDependencies()
- 11.x core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php \Drupal\Core\Config\Entity\ConfigDependencyManager::createGraphConfigEntityDependencies()
Creates a graph of config entity dependencies.
Parameters
array $entities_to_check: The configuration entity full configuration names to determine the dependencies for.
Return value
\Drupal\Core\Config\Entity\ConfigEntityDependency[] A graph of config entity dependency objects that are dependent on the supplied entities to check.
1 call to ConfigDependencyManager::createGraphConfigEntityDependencies()
- ConfigDependencyManager::getDependentEntities in core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigDependencyManager.php - Gets dependencies.
File
-
core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigDependencyManager.php, line 232
Class
- ConfigDependencyManager
- Provides a class to discover configuration entity dependencies.
Namespace
Drupal\Core\Config\EntityCode
protected function createGraphConfigEntityDependencies($entities_to_check) {
$dependent_entities = [];
$graph = $this->getGraph();
foreach ($entities_to_check as $entity) {
if (isset($graph[$entity]) && !empty($graph[$entity]['paths'])) {
foreach ($graph[$entity]['paths'] as $dependency => $value) {
if (isset($this->data[$dependency])) {
$dependent_entities[$dependency] = $this->data[$dependency];
}
}
}
}
return $dependent_entities;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.