3 namespace Drupal\Core\Display;
6 * Provides an interface for PageDisplayVariant plugins.
8 * Page display variants are a specific type of DisplayVariant, intended for
9 * "pages", which always have some main content to be rendered. Hence page
10 * display variants may choose to render that main content in a certain way:
11 * decorated in a certain way, laid out in a certain way, et cetera.
13 * For example, the \Drupal\block\Plugin\DisplayVariant\FullPageVariant page
14 * display variant is used by the Block module to control regions and output
15 * blocks placed in those regions.
17 * @see \Drupal\Core\Display\Annotation\DisplayVariant
18 * @see \Drupal\Core\Display\VariantBase
19 * @see \Drupal\Core\Display\VariantManager
22 interface PageVariantInterface extends VariantInterface {
25 * Sets the main content for the page being rendered.
27 * @param array $main_content
28 * The render array representing the main content.
32 public function setMainContent(array $main_content);
35 * Sets the title for the page being rendered.
37 * @param string|array $title
38 * The page title: either a string for plain titles or a render array for
43 public function setTitle($title);