trait ContextAwarePluginDefinitionTrait (View source)

Provides a trait for context-aware object-based plugin definitions.

Properties

protected ContextDefinitionInterface[] $contextDefinitions

The context definitions for this plugin definition.

Methods

hasContextDefinition($name)

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::hasContextDefinition().

getContextDefinitions()

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::getContextDefinitions().

getContextDefinition($name)

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::getContextDefinition().

addContextDefinition($name, ContextDefinitionInterface $definition)

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::addContextDefinition().

removeContextDefinition($name)

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::removeContextDefinition().

Details

hasContextDefinition($name)

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::hasContextDefinition().

Parameters

$name

getContextDefinitions()

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::getContextDefinitions().

getContextDefinition($name)

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::getContextDefinition().

Parameters

$name

addContextDefinition($name, ContextDefinitionInterface $definition)

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::addContextDefinition().

Parameters

$name
ContextDefinitionInterface $definition

removeContextDefinition($name)

Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::removeContextDefinition().

Parameters

$name