function ContextAwarePluginBase::getContextDefinitions
File
-
core/
lib/ Drupal/ Component/ Plugin/ ContextAwarePluginBase.php, line 79
Class
- ContextAwarePluginBase
- Base class for plugins that are context aware.
Namespace
Drupal\Component\PluginCode
public function getContextDefinitions() {
$definition = $this->getPluginDefinition();
if ($definition instanceof ContextAwarePluginDefinitionInterface) {
return $definition->getContextDefinitions();
}
else {
return !empty($definition['context_definitions']) ? $definition['context_definitions'] : [];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.