trait ContextAwarePluginManagerTrait (View source)

Provides a trait for plugin managers that support context-aware plugins.

Methods

contextHandler()

Wraps the context handler.

getDefinitionsForContexts(array $contexts = [])

See \Drupal\Core\Plugin\Context\ContextAwarePluginManagerInterface::getDefinitionsForContexts().

getDefinitions()

See \Drupal\Component\Plugin\Discovery\DiscoveryInterface::getDefinitions().

Details

protected ContextHandlerInterface contextHandler()

Wraps the context handler.

getDefinitionsForContexts(array $contexts = [])

See \Drupal\Core\Plugin\Context\ContextAwarePluginManagerInterface::getDefinitionsForContexts().

Parameters

array $contexts

abstract getDefinitions()

See \Drupal\Component\Plugin\Discovery\DiscoveryInterface::getDefinitions().