class PageDisplayVariant

Same name in this branch
  1. 11.x core/lib/Drupal/Core/Display/Annotation/PageDisplayVariant.php \Drupal\Core\Display\Annotation\PageDisplayVariant
Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Display/Annotation/PageDisplayVariant.php \Drupal\Core\Display\Annotation\PageDisplayVariant
  2. 8.9.x core/lib/Drupal/Core/Display/Annotation/PageDisplayVariant.php \Drupal\Core\Display\Annotation\PageDisplayVariant
  3. 10 core/lib/Drupal/Core/Display/Annotation/PageDisplayVariant.php \Drupal\Core\Display\Annotation\PageDisplayVariant
  4. 10 core/lib/Drupal/Core/Display/Attribute/PageDisplayVariant.php \Drupal\Core\Display\Attribute\PageDisplayVariant

Defines a page display variant attribute object.

Page display variants are a specific type of display variant, intended to render entire pages. They must render the crucial parts of a page, which are:

  • the title
  • the main content
  • any messages (#type => status_messages)

Attributes

#[\Attribute(\Attribute::TARGET_CLASS)]

Hierarchy

Expanded class hierarchy of PageDisplayVariant

See also

\Drupal\Core\Display\VariantInterface

\Drupal\Core\Display\PageVariantInterface

\Drupal\Core\Display\VariantBase

\Drupal\Core\Display\VariantManager

Plugin API

2 files declare their use of PageDisplayVariant
BlockPageVariant.php in core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php
SimplePageVariant.php in core/lib/Drupal/Core/Render/Plugin/DisplayVariant/SimplePageVariant.php

File

core/lib/Drupal/Core/Display/Attribute/PageDisplayVariant.php, line 20

Namespace

Drupal\Core\Display\Attribute
View source
class PageDisplayVariant extends DisplayVariant {

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
AttributeBase::$class protected property The class used for this attribute class.
AttributeBase::$provider protected property The provider of the attribute class.
AttributeBase::get public function Gets the value of an attribute. Overrides AttributeInterface::get 7
AttributeBase::getClass public function Gets the class of the attribute class. Overrides AttributeInterface::getClass 1
AttributeBase::getId public function Gets the unique ID for this attribute class. Overrides AttributeInterface::getId
AttributeBase::getProvider public function Gets the name of the provider of the attribute class. Overrides AttributeInterface::getProvider
AttributeBase::setClass public function Sets the class of the attributed class. Overrides AttributeInterface::setClass 1
AttributeBase::setProvider public function Sets the name of the provider of the attribute class. Overrides AttributeInterface::setProvider 1
DisplayVariant::__construct public function Constructs a DisplayVariant plugin attribute object. Overrides Plugin::__construct

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