public function ContextAwarePluginBase::getContextDefinitions

Implements \Drupal\Component\Plugin\ContextAwarePluginInterface::getContextDefinitions().

Overrides ContextAwarePluginInterface::getContextDefinitions

3 calls to ContextAwarePluginBase::getContextDefinitions()
ContextAwarePluginBase::getContexts in drupal/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php
Implements \Drupal\Component\Plugin\ContextAwarePluginInterface::getContexts().
ContextAwarePluginBase::getContextValues in drupal/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php
Implements \Drupal\Component\Plugin\ContextAwarePluginInterface::getContextValues().
ContextAwarePluginBase::validateContexts in drupal/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php
Implements \Drupal\Component\Plugin\ContextAwarePluginInterface::valdidateContexts().

File

drupal/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php, line 56
Contains \Drupal\Component\Plugin\ContextAwarePluginBase

Class

ContextAwarePluginBase
Base class for plugins that are context aware.

Namespace

Drupal\Component\Plugin

Code

public function getContextDefinitions() {
  $definition = $this
    ->getPluginDefinition();
  return !empty($definition['context']) ? $definition['context'] : array();
}