public function ContextAwarePluginTrait::setContextValue in Drupal 9
1 call to ContextAwarePluginTrait::setContextValue()
- DefaultsSectionStorage::setContext in core/
modules/ layout_builder/ src/ Plugin/ SectionStorage/ DefaultsSectionStorage.php - Set a context on this plugin.
File
- core/
lib/ Drupal/ Core/ Plugin/ ContextAwarePluginTrait.php, line 122
Class
- ContextAwarePluginTrait
- Provides a trait to add context-aware functionality to plugins.
Namespace
Drupal\Core\PluginCode
public function setContextValue($name, $value) {
$this
->setContext($name, Context::createFromContext($this
->getContext($name), $value));
return $this;
}