ConfigDependencyManager
class ConfigDependencyManager (View source)
Provides a class to discover configuration entity dependencies.
Configuration entities can depend on modules, themes and other configuration entities. The dependency system is used during configuration installation, uninstallation, and synchronization to ensure that configuration entities are handled in the correct order. For example, node types are created before their fields, and both are created before the view display configuration.
The configuration dependency value is structured like this:
Properties
| protected ConfigEntityDependency[] | $data | The config entity data. |
|
| protected array | $graph | The directed acyclic graph. |
Methods
Gets dependencies.
Extracts data from the graph for use in array_multisort().
Sorts the dependencies in order of most dependent last.
Creates a graph of config entity dependencies.
Gets the dependency graph of all the config entities.
Sets data to calculate dependencies for.
Updates one of the lightweight ConfigEntityDependency objects.
Details
ConfigEntityDependency[]
getDependentEntities(string $type, string $name)
Gets dependencies.
protected An
prepareMultisort(array $graph, array $keys)
Extracts data from the graph for use in array_multisort().
array
sortAll()
Sorts the dependencies in order of most dependent last.
protected ConfigEntityDependency[]
createGraphConfigEntityDependencies(array $entities_to_check)
Creates a graph of config entity dependencies.
protected array
getGraph()
Gets the dependency graph of all the config entities.
$this
setData(array $data)
Sets data to calculate dependencies for.
The data is converted into lightweight ConfigEntityDependency objects.
$this
updateData($name, array $dependencies)
Updates one of the lightweight ConfigEntityDependency objects.