file BootstrapSetting.php

Namespace

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

Classes

Name Description
BootstrapSetting Defines a BootstrapSetting annotation object.