Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Core/Display/PageVariantInterface.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\Core\Display; | |
4 | |
5 /** | |
6 * Provides an interface for PageDisplayVariant plugins. | |
7 * | |
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. | |
12 * | |
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. | |
16 * | |
17 * @see \Drupal\Core\Display\Annotation\DisplayVariant | |
18 * @see \Drupal\Core\Display\VariantBase | |
19 * @see \Drupal\Core\Display\VariantManager | |
20 * @see plugin_api | |
21 */ | |
22 interface PageVariantInterface extends VariantInterface { | |
23 | |
24 /** | |
25 * Sets the main content for the page being rendered. | |
26 * | |
27 * @param array $main_content | |
28 * The render array representing the main content. | |
29 * | |
30 * @return $this | |
31 */ | |
32 public function setMainContent(array $main_content); | |
33 | |
34 /** | |
35 * Sets the title for the page being rendered. | |
36 * | |
37 * @param string|array $title | |
38 * The page title: either a string for plain titles or a render array for | |
39 * formatted titles. | |
40 * | |
41 * @return $this | |
42 */ | |
43 public function setTitle($title); | |
44 | |
45 } |