Version 1
[yaffs-website] / web / core / lib / Drupal / Core / Display / Annotation / DisplayVariant.php
1 <?php
2
3 namespace Drupal\Core\Display\Annotation;
4
5 use Drupal\Component\Annotation\Plugin;
6
7 /**
8  * Defines a display variant annotation object.
9  *
10  * Display variants are used to dictate the output of a given Display, which
11  * can be used to control the output of many parts of Drupal.
12  *
13  * Variants are usually chosen by some selection criteria, and are instantiated
14  * directly. Each variant must define its own approach to rendering, and can
15  * either load its own data or be injected with data from another Display
16  * object.
17  *
18  * @todo: Revise description when/if Displays are added to core:
19  *   https://www.drupal.org/node/2292733
20  *
21  * Plugin namespace: Plugin\DisplayVariant
22  *
23  * For working examples, see
24  * - \Drupal\Core\Render\Plugin\DisplayVariant\SimplePageVariant
25  * - \Drupal\block\Plugin\DisplayVariant\BlockPageVariant
26  *
27  * @see \Drupal\Core\Display\VariantInterface
28  * @see \Drupal\Core\Display\VariantBase
29  * @see \Drupal\Core\Display\VariantManager
30  * @see \Drupal\Core\Display\PageVariantInterface
31  * @see plugin_api
32  *
33  * @Annotation
34  */
35 class DisplayVariant extends Plugin {
36
37   /**
38    * The plugin ID.
39    *
40    * @var string
41    */
42   public $id;
43
44   /**
45    * The administrative label.
46    *
47    * @var \Drupal\Core\Annotation\Translation
48    *
49    * @ingroup plugin_translatable
50    */
51   public $admin_label = '';
52
53 }