StaticDiscoveryDecorator
class StaticDiscoveryDecorator extends StaticDiscovery (View source)
A decorator that allows manual registration of undiscoverable definitions.
Traits
Properties
| protected array | $definitions | Cached definitions array. |
from DiscoveryCachedTrait |
| protected DiscoveryInterface | $decorated | The Discovery object being decorated. |
|
| protected Callable | $registerDefinitions | A callback or closure used for registering additional definitions. |
Methods
Gets the definition of all plugins for this type.
{@inheritdoc}
Gets a specific plugin definition.
Constructs a \Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator object.
Passes through all unknown calls onto the decorated object.
Details
array
getDefinitions()
Gets the definition of all plugins for this type.
getDefinition($base_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}
setDefinition($plugin, $definition)
Sets a plugin definition.
deleteDefinition($plugin)
Deletes a plugin definition.
__construct(DiscoveryInterface $decorated, Callable $registerDefinitions = NULL)
Constructs a \Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator object.
__call($method, $args)
Passes through all unknown calls onto the decorated object.