PluginManagerInterface
interface PluginManagerInterface implements DiscoveryInterface, FactoryInterface, MapperInterface (View source)
Interface implemented by plugin managers.
There are no explicit methods on the manager interface. Instead plugin managers broker the interactions of the different plugin components, and therefore, must implement each component interface, which is enforced by this interface extending all of the component ones.
While a plugin manager may directly implement these interface methods with custom logic, it is expected to be more common for plugin managers to proxy the method invocations to the respective components, and directly implement only the additional functionality needed by the specific pluggable system. To follow this pattern, plugin managers can extend from the PluginManagerBase class, which contains the proxying logic.
Methods
Gets a specific plugin definition.
Indicates if a specific plugin definition exists.
Creates a pre-configured instance of a plugin.
Gets a preconfigured instance of a plugin.
Details
mixed
getDefinition(string $plugin_id, bool $exception_on_invalid = TRUE)
Gets a specific plugin definition.
array
getDefinitions()
Gets the definition of all plugins for this type.
bool
hasDefinition(string $plugin_id)
Indicates if a specific plugin definition exists.
object
createInstance(string $plugin_id, array $configuration = [])
Creates a pre-configured instance of a plugin.
object|false
getInstance(array $options)
Gets a preconfigured instance of a plugin.