function ConfigManager::findConfigEntityDependencies
Same name and namespace in other branches
- 10 core/lib/Drupal/Core/Config/ConfigManager.php \Drupal\Core\Config\ConfigManager::findConfigEntityDependencies()
- 11.x core/lib/Drupal/Core/Config/ConfigManager.php \Drupal\Core\Config\ConfigManager::findConfigEntityDependencies()
Finds config entities that are dependent on extensions or entities.
Parameters
string $type: The type of dependency being checked. Either 'module', 'theme', 'config' or 'content'.
array $names: The specific names to check. If $type equals 'module' or 'theme' then it should be a list of module names or theme names. In the case of 'config' or 'content' it should be a list of configuration dependency names.
Return value
\Drupal\Core\Config\Entity\ConfigEntityDependency[] An array of configuration entity dependency objects.
Overrides ConfigManagerInterface::findConfigEntityDependencies
2 calls to ConfigManager::findConfigEntityDependencies()
- ConfigManager::findConfigEntityDependenciesAsEntities in core/
lib/ Drupal/ Core/ Config/ ConfigManager.php - Finds config entities that are dependent on extensions or entities.
- ConfigManager::findConfigEntityDependents in core/
lib/ Drupal/ Core/ Config/ ConfigManager.php - Deprecated method to find config entity dependencies.
File
-
core/
lib/ Drupal/ Core/ Config/ ConfigManager.php, line 261
Class
- ConfigManager
- The ConfigManager provides helper functions for the configuration system.
Namespace
Drupal\Core\ConfigCode
public function findConfigEntityDependencies($type, array $names, ConfigDependencyManager $dependency_manager = NULL) {
if (!$dependency_manager) {
$dependency_manager = $this->getConfigDependencyManager();
}
$dependencies = [];
foreach ($names as $name) {
$dependencies[] = $dependency_manager->getDependentEntities($type, $name);
}
return array_merge([], ...$dependencies);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.