FilteredPluginManagerTrait
trait FilteredPluginManagerTrait (View source)
Provides a trait for plugin managers that allow filtering plugin definitions.
Traits
Provides a trait for plugin managers that support context-aware plugins.
Methods
Wraps the context handler.
See \Drupal\Core\Plugin\Context\ContextAwarePluginManagerInterface::getDefinitionsForContexts().
See \Drupal\Component\Plugin\Discovery\DiscoveryInterface::getDefinitions().
Implements \Drupal\Core\Plugin\FilteredPluginManagerInterface::getFilteredDefinitions().
A string identifying the plugin type.
Wraps the module handler.
Wraps the theme manager.
Details
protected ContextHandlerInterface
contextHandler()
Wraps the context handler.
getDefinitionsForContexts(array $contexts = [])
See \Drupal\Core\Plugin\Context\ContextAwarePluginManagerInterface::getDefinitionsForContexts().
abstract
getDefinitions()
See \Drupal\Component\Plugin\Discovery\DiscoveryInterface::getDefinitions().
getFilteredDefinitions($consumer, $contexts = NULL, array $extra = [])
Implements \Drupal\Core\Plugin\FilteredPluginManagerInterface::getFilteredDefinitions().
abstract protected string
getType()
A string identifying the plugin type.
This string should be unique and generally will correspond to the string used by the discovery, e.g. the annotation class or the YAML file name.
protected ModuleHandlerInterface
moduleHandler()
Wraps the module handler.
protected ThemeManagerInterface
themeManager()
Wraps the theme manager.