function ConfigEntityDependency::getDependencies
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Config/Entity/ConfigEntityDependency.php \Drupal\Core\Config\Entity\ConfigEntityDependency::getDependencies()
- 10 core/lib/Drupal/Core/Config/Entity/ConfigEntityDependency.php \Drupal\Core\Config\Entity\ConfigEntityDependency::getDependencies()
- 11.x core/lib/Drupal/Core/Config/Entity/ConfigEntityDependency.php \Drupal\Core\Config\Entity\ConfigEntityDependency::getDependencies()
Gets the configuration entity's dependencies of the supplied type.
Parameters
string $type: The type of dependency to return. Either 'module', 'theme', 'config' or 'content'.
Return value
array The list of dependencies of the supplied type.
File
-
core/
lib/ Drupal/ Core/ Config/ Entity/ ConfigEntityDependency.php, line 59
Class
- ConfigEntityDependency
- Provides a value object to discover configuration dependencies.
Namespace
Drupal\Core\Config\EntityCode
public function getDependencies($type) {
$dependencies = [];
if (isset($this->dependencies[$type])) {
$dependencies = $this->dependencies[$type];
}
// Add a dependency on the provider module (which defines this config
// entity type, such as 'node' in the case of 'node.type' configuration).
if ($type == 'module') {
$dependencies[] = substr($this->name, 0, strpos($this->name, '.'));
}
return $dependencies;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.