public function ContextAwarePluginDefinitionTrait::addContextDefinition in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Component/Plugin/Definition/ContextAwarePluginDefinitionTrait.php \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionTrait::addContextDefinition()
Implements \Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface::addContextDefinition().
1 call to ContextAwarePluginDefinitionTrait::addContextDefinition()
- SectionStorageDefinition::__construct in core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageDefinition.php - LayoutDefinition constructor.
File
- core/
lib/ Drupal/ Component/ Plugin/ Definition/ ContextAwarePluginDefinitionTrait.php, line 47
Class
- ContextAwarePluginDefinitionTrait
- Provides a trait for context-aware object-based plugin definitions.
Namespace
Drupal\Component\Plugin\DefinitionCode
public function addContextDefinition($name, ContextDefinitionInterface $definition) {
$this->contextDefinitions[$name] = $definition;
return $this;
}