- Issue created by @joachim
Config dependency arrays are complex: they contain 2 levels, keyed first by type and then containing items. The format of each item is different depending on the type.
These arrays need to be merged sometimes, and passed around.
For example, if a permission depends on a config entity, you need to get the dependency array from the config entity, possibly merge it with other dependencies, and then set it on the permission definition.
Introduce a class to hold this data, which allows merging. This would work in a similar way to CacheableMetadata.
E.g.
$dependencies = new DependencyMetadata()l
$dependencies
->addModuleDependencies('mymodule')
->merge($plugin->getDependencies())
For BC, this object would need to implement ArrayAccess.
- Decide how to implement this
- Bikeshed the class name
- Decide whether to wait for
π
Create \Drupal\Component\Utility\ArrayObject
Needs work
to get in
New class.
Active
10.1 β¨
Last updated