You are here

public function ContextAwareVariantInterface::getContexts in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Display/ContextAwareVariantInterface.php \Drupal\Core\Display\ContextAwareVariantInterface::getContexts()
  2. 9 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();