file BootstrapSetting.php

Contains \Drupal\bootstrap\Annotation\BootstrapSetting.

Namespace

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

Classes

Namesort descending Description
BootstrapSetting Defines a BootstrapSetting annotation object.