function ContextAwarePluginInterface::getContexts

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php \Drupal\Component\Plugin\ContextAwarePluginInterface::getContexts()
  2. 10 core/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php \Drupal\Component\Plugin\ContextAwarePluginInterface::getContexts()
  3. 11.x core/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php \Drupal\Component\Plugin\ContextAwarePluginInterface::getContexts()

Gets the defined contexts.

Return value

array The set context objects.

Throws

\Drupal\Component\Plugin\Exception\PluginException If contexts are defined but not set.

1 method overrides ContextAwarePluginInterface::getContexts()
ContextAwarePluginBase::getContexts in core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php
Gets the defined contexts.

File

core/lib/Drupal/Component/Plugin/ContextAwarePluginInterface.php, line 48

Class

ContextAwarePluginInterface
Interface for defining context aware plugins.

Namespace

Drupal\Component\Plugin

Code

public function getContexts();

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