function ContextAwareVariantInterface::getContexts

Same name in other branches
  1. 9 core/lib/Drupal/Core/Display/ContextAwareVariantInterface.php \Drupal\Core\Display\ContextAwareVariantInterface::getContexts()
  2. 8.9.x core/lib/Drupal/Core/Display/ContextAwareVariantInterface.php \Drupal\Core\Display\ContextAwareVariantInterface::getContexts()
  3. 11.x core/lib/Drupal/Core/Display/ContextAwareVariantInterface.php \Drupal\Core\Display\ContextAwareVariantInterface::getContexts()

Gets the values for all defined contexts.

Return value

\Drupal\Component\Plugin\Context\ContextInterface[] An array of set contexts, keyed by context name.

1 method overrides ContextAwareVariantInterface::getContexts()
TestDisplayVariant::getContexts in core/modules/system/tests/modules/display_variant_test/src/Plugin/DisplayVariant/TestDisplayVariant.php
Gets the contexts.

File

core/lib/Drupal/Core/Display/ContextAwareVariantInterface.php, line 16

Class

ContextAwareVariantInterface
Provides an interface for variant plugins that are context-aware.

Namespace

Drupal\Core\Display

Code

public function getContexts();

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