function TestDisplayVariant::getContexts

Same name in other branches
  1. 8.9.x core/modules/system/tests/modules/display_variant_test/src/Plugin/DisplayVariant/TestDisplayVariant.php \Drupal\display_variant_test\Plugin\DisplayVariant\TestDisplayVariant::getContexts()
  2. 10 core/modules/system/tests/modules/display_variant_test/src/Plugin/DisplayVariant/TestDisplayVariant.php \Drupal\display_variant_test\Plugin\DisplayVariant\TestDisplayVariant::getContexts()
  3. 11.x core/modules/system/tests/modules/display_variant_test/src/Plugin/DisplayVariant/TestDisplayVariant.php \Drupal\display_variant_test\Plugin\DisplayVariant\TestDisplayVariant::getContexts()

Gets the contexts.

Return value

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

Overrides ContextAwareVariantInterface::getContexts

1 call to TestDisplayVariant::getContexts()
TestDisplayVariant::build in core/modules/system/tests/modules/display_variant_test/src/Plugin/DisplayVariant/TestDisplayVariant.php
Builds and returns the renderable array for the display variant.

File

core/modules/system/tests/modules/display_variant_test/src/Plugin/DisplayVariant/TestDisplayVariant.php, line 49

Class

TestDisplayVariant
Provides a display variant that requires configuration.

Namespace

Drupal\display_variant_test\Plugin\DisplayVariant

Code

public function getContexts() {
    return $this->contexts;
}

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