ContainerDerivativeDiscoveryDecorator
class ContainerDerivativeDiscoveryDecorator extends DerivativeDiscoveryDecorator (View source)
Injects dependencies into derivers if they use ContainerDeriverInterface.
Traits
Properties
| protected DeriverInterface[] | $derivers | Plugin derivers. |
from DerivativeDiscoveryDecorator |
| protected DiscoveryInterface | $decorated | The decorated plugin discovery. |
from DerivativeDiscoveryDecorator |
Methods
Gets a specific plugin definition.
Adds derivatives to a list of plugin definitions.
Decodes derivative id and plugin id from a string.
Encodes plugin and derivative id's into a string.
Gets a deriver for a base plugin.
Gets the deriver class name from the base plugin definition.
Merges a base and derivative definition, taking into account empty values.
Passes through all unknown calls onto the decorated object.
Details
abstract
getDefinitions()
{@inheritdoc}
getDefinition($plugin_id, $exception_on_invalid = TRUE)
{@inheritdoc}
protected array|null
doGetDefinition(array $definitions, string $plugin_id, bool $exception_on_invalid)
Gets a specific plugin definition.
hasDefinition($plugin_id)
{@inheritdoc}
__construct(DiscoveryInterface $decorated)
Creates a new instance.
protected
getDerivatives(array $base_plugin_definitions)
Adds derivatives to a list of plugin definitions.
This should be called by the class extending this in DiscoveryInterface::getDefinitions().
protected array
decodePluginId(string $plugin_id)
Decodes derivative id and plugin id from a string.
protected string
encodePluginId(string $base_plugin_id, string $derivative_id)
Encodes plugin and derivative id's into a string.
protected DeriverInterface|null
getDeriver(string $base_plugin_id, mixed $base_definition)
Gets a deriver for a base plugin.
protected string|null
getDeriverClass(array $base_definition)
Gets the deriver class name from the base plugin definition.
protected array
mergeDerivativeDefinition(array $base_plugin_definition, array $derivative_definition)
Merges a base and derivative definition, taking into account empty values.
__call($method, $args)
Passes through all unknown calls onto the decorated object.