Added missing modules, including some as submodules.
[yaffs-website] / web / modules / contrib / layout_plugin / src / Annotation / Layout.php
1 <?php
2
3 namespace Drupal\layout_plugin\Annotation;
4
5 use Drupal\Component\Annotation\Plugin;
6
7 /**
8  * Defines a Layout annotation object.
9  *
10  * Layouts are used to define a list of regions and then output render arrays
11  * in each of the regions, usually using a template.
12  *
13  * Plugin namespace: Plugin\Layout
14  *
15  * @see \Drupal\layout_plugin\Plugin\Layout\LayoutInterface
16  * @see \Drupal\layout_plugin\Plugin\Layout\LayoutBase
17  * @see \Drupal\layout_plugin\Plugin\Layout\LayoutPluginManager
18  * @see plugin_api
19  *
20  * @Annotation
21  */
22 class Layout extends Plugin {
23
24   /**
25    * The plugin ID.
26    *
27    * @var string
28    */
29   public $id;
30
31   /**
32    * The layout type.
33    *
34    * Available options:
35    *  - full: Layout for the whole page.
36    *  - page: Layout for the main page response.
37    *  - partial: A partial layout that is typically used for sub-regions.
38    *
39    * @var string
40    */
41   public $type = 'page';
42
43   /**
44    * The human-readable name.
45    *
46    * @var \Drupal\Core\Annotation\Translation
47    *
48    * @ingroup plugin_translatable
49    */
50   public $label;
51
52   /**
53    * An optional description for advanced layouts.
54    *
55    * Sometimes layouts are so complex that the name is insufficient to describe
56    * a layout such that a visually impaired administrator could layout a page
57    * for a non-visually impaired audience. If specified, it will provide a
58    * description that is used for accessibility purposes.
59    *
60    * @var \Drupal\Core\Annotation\Translation
61    *
62    * @ingroup plugin_translatable
63    */
64   public $description;
65
66   /**
67    * The human-readable category.
68    *
69    * @var \Drupal\Core\Annotation\Translation
70    *
71    * @ingroup plugin_translatable
72    */
73   public $category;
74
75   /**
76    * The theme hook used to render this layout.
77    *
78    * If specified, it's assumed that the module or theme registering this layout
79    * will also register the theme hook with hook_theme() itself. This is
80    * mutually exclusive with 'template' - you can't specify both.
81    *
82    * @var string optional
83    *
84    * @see hook_theme()
85    */
86   public $theme;
87
88   /**
89    * The template file to render this layout (relative to the 'path' given).
90    *
91    * If specified, then the layout_plugin module will register the template with
92    * hook_theme() and the module or theme registering this layout does not need
93    * to do it. This is mutually exclusive with 'theme' - you can't specify both.
94    *
95    * @var string optional
96    *
97    * @see hook_theme()
98    */
99   public $template;
100
101   /**
102    * Path (relative to the module or theme) to resources like icon or template.
103    *
104    * @var string optional
105    */
106   public $path;
107
108   /**
109    * The asset library.
110    *
111    * If specified, it's assumed that the module or theme registering this layout
112    * will also register the library in its *.libraries.yml itself. This is
113    * mutually exclusive with 'css' - you can't specify both.
114    *
115    * @var string optional
116    */
117   public $library;
118
119   /**
120    * The CSS file.
121    *
122    * If specified, then the layout_plugin module will register the library for
123    * this CSS file automatically and the module or theme registering this layout
124    * does not need to do it. This is mutually exclusive with 'library' - you
125    * can't specify both.
126    *
127    * @var string optional
128    *
129    * @deprecated when moving layout plugin to core
130    */
131   public $css;
132
133   /**
134    * The path to the preview image (relative to the 'path' given).
135    *
136    * @var string optional
137    */
138   public $icon;
139
140   /**
141    * An associative array of regions in this layout.
142    *
143    * The key of the array is the machine name of the region, and the value is
144    * an associative array with the following keys:
145    * - label: (string) The human-readable name of the region.
146    *
147    * Any remaining keys may have special meaning for the given layout plugin,
148    * but are undefined here.
149    *
150    * @var array
151    */
152   public $regions = array();
153
154 }