function ContextAwarePluginBase::getContextMapping

Overrides ContextAwarePluginInterface::getContextMapping

File

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

Class

ContextAwarePluginBase
Base class for plugins that are context aware.

Namespace

Drupal\Core\Plugin

Code

public function getContextMapping() {
    $configuration = PluginHelper::isConfigurable($this) ? $this->getConfiguration() : $this->configuration;
    return isset($configuration['context_mapping']) ? $configuration['context_mapping'] : [];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.