public function ContextAwareVariantInterface::setContexts in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Display/ContextAwareVariantInterface.php \Drupal\Core\Display\ContextAwareVariantInterface::setContexts()
Sets the context values for this display variant.
Parameters
\Drupal\Component\Plugin\Context\ContextInterface[] $contexts: An array of contexts, keyed by context name.
Return value
$this
1 method overrides ContextAwareVariantInterface::setContexts()
- TestDisplayVariant::setContexts in core/
modules/ system/ tests/ modules/ display_variant_test/ src/ Plugin/ DisplayVariant/ TestDisplayVariant.php - Sets the contexts.
File
- core/
lib/ Drupal/ Core/ Display/ ContextAwareVariantInterface.php, line 31 - Contains \Drupal\Core\Display\ContextAwareVariantInterface.
Class
- ContextAwareVariantInterface
- Provides an interface for variant plugins that are context-aware.
Namespace
Drupal\Core\DisplayCode
public function setContexts(array $contexts);