interface ContextAwareVariantInterface in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Display/ContextAwareVariantInterface.php \Drupal\Core\Display\ContextAwareVariantInterface
Provides an interface for variant plugins that are context-aware.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Component\Plugin\ConfigurablePluginInterface; interface \Drupal\Core\Plugin\PluginFormInterface; interface \Drupal\Core\Cache\RefinableCacheableDependencyInterface
- interface \Drupal\Core\Display\VariantInterface
- interface \Drupal\Core\Display\ContextAwareVariantInterface
- interface \Drupal\Core\Display\VariantInterface
Expanded class hierarchy of ContextAwareVariantInterface
All classes that implement ContextAwareVariantInterface
2 files declare their use of ContextAwareVariantInterface
- HtmlRenderer.php in core/
lib/ Drupal/ Core/ Render/ MainContent/ HtmlRenderer.php - Contains \Drupal\Core\Render\MainContent\HtmlRenderer.
- TestDisplayVariant.php in core/
modules/ system/ tests/ modules/ display_variant_test/ src/ Plugin/ DisplayVariant/ TestDisplayVariant.php - Contains \Drupal\display_variant_test\Plugin\DisplayVariant\TestDisplayVariant.
File
- core/
lib/ Drupal/ Core/ Display/ ContextAwareVariantInterface.php, line 13 - Contains \Drupal\Core\Display\ContextAwareVariantInterface.
Namespace
Drupal\Core\DisplayView source
interface ContextAwareVariantInterface extends VariantInterface {
/**
* Gets the values for all defined contexts.
*
* @return \Drupal\Component\Plugin\Context\ContextInterface[]
* An array of set contexts, keyed by context name.
*/
public function getContexts();
/**
* Sets the context values for this display variant.
*
* @param \Drupal\Component\Plugin\Context\ContextInterface[] $contexts
* An array of contexts, keyed by context name.
*
* @return $this
*/
public function setContexts(array $contexts);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CacheableDependencyInterface:: |
public | function | The cache contexts associated with this object. | 26 |
CacheableDependencyInterface:: |
public | function | The maximum age for which this object may be cached. | 26 |
CacheableDependencyInterface:: |
public | function | The cache tags associated with this object. | 19 |
ConfigurablePluginInterface:: |
public | function | Gets default configuration for this plugin. | 9 |
ConfigurablePluginInterface:: |
public | function | Gets this plugin's configuration. | 10 |
ConfigurablePluginInterface:: |
public | function | Sets the configuration for this plugin instance. | 10 |
ContextAwareVariantInterface:: |
public | function | Gets the values for all defined contexts. | 1 |
ContextAwareVariantInterface:: |
public | function | Sets the context values for this display variant. | 1 |
DependentPluginInterface:: |
public | function | Calculates dependencies for the configured plugin. | 15 |
PluginFormInterface:: |
public | function | Form constructor. | 23 |
PluginFormInterface:: |
public | function | Form submission handler. | 21 |
PluginFormInterface:: |
public | function | Form validation handler. | 12 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 2 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |
RefinableCacheableDependencyInterface:: |
public | function | Adds a dependency on an object: merges its cacheability metadata. | 1 |
RefinableCacheableDependencyInterface:: |
public | function | Adds cache contexts. | 1 |
RefinableCacheableDependencyInterface:: |
public | function | Adds cache tags. | 1 |
RefinableCacheableDependencyInterface:: |
public | function | Merges the maximum age (in seconds) with the existing maximum age. | 1 |
VariantInterface:: |
public | function | Determines if this display variant is accessible. | 1 |
VariantInterface:: |
public | function | Returns the admin-facing display variant label. | 1 |
VariantInterface:: |
public | function | Builds and returns the renderable array for the display variant. | 3 |
VariantInterface:: |
public | function | Returns the weight of the display variant. | 1 |
VariantInterface:: |
public | function | Returns the unique ID for the display variant. | 1 |
VariantInterface:: |
public | function | Returns the user-facing display variant label. | 1 |
VariantInterface:: |
public | function | Sets the weight of the display variant. | 1 |