W3cubDocs

/Drupal 8

interface PageVariantInterface

Provides an interface for PageDisplayVariant plugins.

Page display variants are a specific type of DisplayVariant, intended for "pages", which always have some main content to be rendered. Hence page display variants may choose to render that main content in a certain way: decorated in a certain way, laid out in a certain way, et cetera.

For example, the \Drupal\block\Plugin\DisplayVariant\FullPageVariant page display variant is used by the Block module to control regions and output blocks placed in those regions.

Hierarchy

See also

\Drupal\Core\Display\Annotation\DisplayVariant

\Drupal\Core\Display\VariantBase

\Drupal\Core\Display\VariantManager

Plugin API

File

core/lib/Drupal/Core/Display/PageVariantInterface.php, line 22

Namespace

Drupal\Core\Display

Members

Name Modifiers Type Description
CacheableDependencyInterface::getCacheContexts public function The cache contexts associated with this object. Overrides CacheableDependencyInterface::getCacheContexts
CacheableDependencyInterface::getCacheMaxAge public function The maximum age for which this object may be cached. Overrides CacheableDependencyInterface::getCacheMaxAge
CacheableDependencyInterface::getCacheTags public function The cache tags associated with this object. Overrides CacheableDependencyInterface::getCacheTags
ConfigurablePluginInterface::defaultConfiguration public function Gets default configuration for this plugin.
ConfigurablePluginInterface::getConfiguration public function Gets this plugin's configuration.
ConfigurablePluginInterface::setConfiguration public function Sets the configuration for this plugin instance.
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin.
PageVariantInterface::setMainContent public function Sets the main content for the page being rendered.
PageVariantInterface::setTitle public function Sets the title for the page being rendered.
PluginFormInterface::buildConfigurationForm public function Form constructor.
PluginFormInterface::submitConfigurationForm public function Form submission handler.
PluginFormInterface::validateConfigurationForm public function Form validation handler.
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation.
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance.
RefinableCacheableDependencyInterface::addCacheableDependency public function Adds a dependency on an object: merges its cacheability metadata. Overrides RefinableCacheableDependencyInterface::addCacheableDependency
RefinableCacheableDependencyInterface::addCacheContexts public function Adds cache contexts. Overrides RefinableCacheableDependencyInterface::addCacheContexts
RefinableCacheableDependencyInterface::addCacheTags public function Adds cache tags. Overrides RefinableCacheableDependencyInterface::addCacheTags
RefinableCacheableDependencyInterface::mergeCacheMaxAge public function Merges the maximum age (in seconds) with the existing maximum age. Overrides RefinableCacheableDependencyInterface::mergeCacheMaxAge
VariantInterface::access public function Determines if this display variant is accessible.
VariantInterface::adminLabel public function Returns the admin-facing display variant label.
VariantInterface::build public function Builds and returns the renderable array for the display variant.
VariantInterface::getWeight public function Returns the weight of the display variant.
VariantInterface::id public function Returns the unique ID for the display variant.
VariantInterface::label public function Returns the user-facing display variant label.
VariantInterface::setWeight public function Sets the weight of the display variant.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Display!PageVariantInterface.php/interface/PageVariantInterface/8.1.x