FilteredPluginManagerInterface
interface FilteredPluginManagerInterface implements PluginManagerInterface (View source)
Provides an interface for plugin managers that allow filtering definitions.
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.
Gets the plugin definitions for a given type and consumer and filters them.
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.
PluginDefinitionInterface[]|array[]
getFilteredDefinitions(string $consumer, ContextInterface[]|null $contexts = NULL, array $extra = [])
Gets the plugin definitions for a given type and consumer and filters them.
This allows modules and themes to alter plugin definitions at runtime, which is useful for tasks like hiding specific plugins from a particular user interface.