function ContextAwarePluginTrait::setContextValue

Same name in other branches
  1. 9 core/lib/Drupal/Core/Plugin/ContextAwarePluginTrait.php \Drupal\Core\Plugin\ContextAwarePluginTrait::setContextValue()
  2. 11.x core/lib/Drupal/Core/Plugin/ContextAwarePluginTrait.php \Drupal\Core\Plugin\ContextAwarePluginTrait::setContextValue()
1 call to ContextAwarePluginTrait::setContextValue()
DefaultsSectionStorage::setContext in core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php

File

core/lib/Drupal/Core/Plugin/ContextAwarePluginTrait.php, line 88

Class

ContextAwarePluginTrait
Provides a trait to add context-aware functionality to plugins.

Namespace

Drupal\Core\Plugin

Code

public function setContextValue($name, $value) {
    $this->setContext($name, Context::createFromContext($this->getContext($name), $value));
    return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.