public function TestDisplayVariant::setContexts in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/tests/modules/display_variant_test/src/Plugin/DisplayVariant/TestDisplayVariant.php \Drupal\display_variant_test\Plugin\DisplayVariant\TestDisplayVariant::setContexts()
Sets the contexts.
Parameters
\Drupal\Component\Plugin\Context\ContextInterface[] $contexts: An array of contexts, keyed by context name.
Return value
$this
Overrides ContextAwareVariantInterface::setContexts
File
- core/
modules/ system/ tests/ modules/ display_variant_test/ src/ Plugin/ DisplayVariant/ TestDisplayVariant.php, line 66 - Contains \Drupal\display_variant_test\Plugin\DisplayVariant\TestDisplayVariant.
Class
- TestDisplayVariant
- Provides a display variant that requires configuration.
Namespace
Drupal\display_variant_test\Plugin\DisplayVariantCode
public function setContexts(array $contexts) {
$this->contexts = $contexts;
return $this;
}