public function ContextAwarePluginTrait::getContextMapping in Drupal 9
Same name and namespace in other branches
- 10 core/lib/Drupal/Core/Plugin/ContextAwarePluginTrait.php \Drupal\Core\Plugin\ContextAwarePluginTrait::getContextMapping()
File
- core/
lib/ Drupal/ Core/ Plugin/ ContextAwarePluginTrait.php, line 130
Class
- ContextAwarePluginTrait
- Provides a trait to add context-aware functionality to plugins.
Namespace
Drupal\Core\PluginCode
public function getContextMapping() {
$configuration = $this instanceof ConfigurableInterface ? $this
->getConfiguration() : $this->configuration;
return isset($configuration['context_mapping']) ? $configuration['context_mapping'] : [];
}