Mercurial > hg > isophonics-drupal-site
annotate core/lib/Drupal/Core/Display/PageVariantInterface.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\Core\Display; |
Chris@0 | 4 |
Chris@0 | 5 /** |
Chris@0 | 6 * Provides an interface for PageDisplayVariant plugins. |
Chris@0 | 7 * |
Chris@0 | 8 * Page display variants are a specific type of DisplayVariant, intended for |
Chris@0 | 9 * "pages", which always have some main content to be rendered. Hence page |
Chris@0 | 10 * display variants may choose to render that main content in a certain way: |
Chris@0 | 11 * decorated in a certain way, laid out in a certain way, et cetera. |
Chris@0 | 12 * |
Chris@0 | 13 * For example, the \Drupal\block\Plugin\DisplayVariant\FullPageVariant page |
Chris@0 | 14 * display variant is used by the Block module to control regions and output |
Chris@0 | 15 * blocks placed in those regions. |
Chris@0 | 16 * |
Chris@0 | 17 * @see \Drupal\Core\Display\Annotation\DisplayVariant |
Chris@0 | 18 * @see \Drupal\Core\Display\VariantBase |
Chris@0 | 19 * @see \Drupal\Core\Display\VariantManager |
Chris@0 | 20 * @see plugin_api |
Chris@0 | 21 */ |
Chris@0 | 22 interface PageVariantInterface extends VariantInterface { |
Chris@0 | 23 |
Chris@0 | 24 /** |
Chris@0 | 25 * Sets the main content for the page being rendered. |
Chris@0 | 26 * |
Chris@0 | 27 * @param array $main_content |
Chris@0 | 28 * The render array representing the main content. |
Chris@0 | 29 * |
Chris@0 | 30 * @return $this |
Chris@0 | 31 */ |
Chris@0 | 32 public function setMainContent(array $main_content); |
Chris@0 | 33 |
Chris@0 | 34 /** |
Chris@0 | 35 * Sets the title for the page being rendered. |
Chris@0 | 36 * |
Chris@0 | 37 * @param string|array $title |
Chris@0 | 38 * The page title: either a string for plain titles or a render array for |
Chris@0 | 39 * formatted titles. |
Chris@0 | 40 * |
Chris@0 | 41 * @return $this |
Chris@0 | 42 */ |
Chris@0 | 43 public function setTitle($title); |
Chris@0 | 44 |
Chris@0 | 45 } |