function ContextAwarePluginBase::setContextValue

Same name in this branch
  1. 8.9.x core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php \Drupal\Component\Plugin\ContextAwarePluginBase::setContextValue()
Same name and namespace in other branches
  1. 9 core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php \Drupal\Component\Plugin\ContextAwarePluginBase::setContextValue()

File

core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php, line 72

Class

ContextAwarePluginBase
Base class for plugins that are context aware.

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.