PluginManagerBase
abstract class PluginManagerBase implements PluginManagerInterface (View source)
Base class for plugin managers.
Traits
Properties
| protected DiscoveryInterface | $discovery | The object that discovers plugins managed by this manager. |
|
| protected FactoryInterface | $factory | The object that instantiates plugins managed by this manager. |
|
| protected MapperInterface|null | $mapper | The object that returns the preconfigured plugin instance appropriate for a particular runtime condition. |
Methods
Gets the definition of all plugins for this type.
Gets a specific plugin definition.
Gets a specific plugin definition.
Gets the plugin discovery.
Gets the plugin factory.
Creates a pre-configured instance of a plugin.
Allows plugin managers to specify custom behavior if a plugin is not found.
Gets a preconfigured instance of a plugin.
Details
array
getDefinitions()
Gets the definition of all plugins for this type.
mixed
getDefinition(string $plugin_id, bool $exception_on_invalid = TRUE)
Gets a specific plugin definition.
protected array|null
doGetDefinition(array $definitions, string $plugin_id, bool $exception_on_invalid)
Gets a specific plugin definition.
hasDefinition($plugin_id)
{@inheritdoc}
protected DiscoveryInterface
getDiscovery()
Gets the plugin discovery.
protected FactoryInterface
getFactory()
Gets the plugin factory.
object
createInstance(string $plugin_id, array $configuration = [])
Creates a pre-configured instance of a plugin.
protected object
handlePluginNotFound(string $plugin_id, array $configuration)
Allows plugin managers to specify custom behavior if a plugin is not found.
object|false
getInstance(array $options)
Gets a preconfigured instance of a plugin.