function ContextAwarePluginBase::getContextValues
Same name in other branches
- 8.9.x core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php \Drupal\Component\Plugin\ContextAwarePluginBase::getContextValues()
Overrides ContextAwarePluginInterface::getContextValues
File
-
core/
lib/ Drupal/ Component/ Plugin/ ContextAwarePluginBase.php, line 137
Class
- ContextAwarePluginBase
- Base class for plugins that are context aware.
Namespace
Drupal\Component\PluginCode
public function getContextValues() {
$values = [];
foreach ($this->getContextDefinitions() as $name => $definition) {
$values[$name] = isset($this->context[$name]) ? $this->context[$name]
->getContextValue() : NULL;
}
return $values;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.