2d1e194c317d11ab10abfc73fd82d7e12c18eaad
[yaffs-website] / web / themes / contrib / bootstrap / src / Annotation / BootstrapSetting.php
1 <?php
2
3 namespace Drupal\bootstrap\Annotation;
4
5 use Drupal\Component\Annotation\Plugin;
6
7 /**
8  * Defines a BootstrapSetting annotation object.
9  *
10  * Plugin Namespace: "Plugin/Setting".
11  *
12  * @see \Drupal\bootstrap\Plugin\SettingInterface
13  * @see \Drupal\bootstrap\Plugin\SettingManager
14  * @see plugin_api
15  *
16  * @Annotation
17  *
18  * @Attributes({
19  *
20  * @Attribute("defaultValue", type = "mixed", required = true),
21  *
22  * @Attribute("type", type = "string", required = true),
23  * })
24  *
25  * @ingroup plugins_setting
26  */
27 class BootstrapSetting extends Plugin {
28
29   /**
30    * The setting's description.
31    *
32    * @var \Drupal\Core\Annotation\Translation
33    */
34   public $description;
35
36   /**
37    * The setting's default value.
38    *
39    * @var mixed
40    */
41   public $defaultValue;
42
43   /**
44    * The setting's groups.
45    *
46    * @var \Drupal\Core\Annotation\Translation[]
47    */
48   public $groups = [];
49
50   /**
51    * The setting's title.
52    *
53    * @var \Drupal\Core\Annotation\Translation
54    */
55   public $title;
56
57   /**
58    * The setting's type.
59    *
60    * @var string
61    */
62   public $type;
63
64   /**
65    * The setting's see references.
66    *
67    * @var array
68    */
69   public $see = [];
70
71   /**
72    * {@inheritdoc}
73    */
74   public function __construct($values) {
75     if (!isset($values['groups'])) {
76       $values['groups'] = ['general' => t('General')];
77     }
78     parent::__construct($values);
79   }
80
81 }