function ContextAwarePluginBase::getContexts
Same name in other branches
- 8.9.x core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php \Drupal\Component\Plugin\ContextAwarePluginBase::getContexts()
Overrides ContextAwarePluginInterface::getContexts
1 call to ContextAwarePluginBase::getContexts()
- ContextAwarePluginBase::validateContexts in core/
lib/ Drupal/ Component/ Plugin/ ContextAwarePluginBase.php - Validates the set values for the defined contexts.
File
-
core/
lib/ Drupal/ Component/ Plugin/ ContextAwarePluginBase.php, line 108
Class
- ContextAwarePluginBase
- Base class for plugins that are context aware.
Namespace
Drupal\Component\PluginCode
public function getContexts() {
// Make sure all context objects are initialized.
foreach ($this->getContextDefinitions() as $name => $definition) {
$this->getContext($name);
}
return $this->context;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.