03826356b76f78ac35af2b20e22ff3bbead2e1fa
[yaffs-website] / web / themes / contrib / bootstrap / src / Plugin / Setting / JavaScript / Modals / ModalSize.php
1 <?php
2 /**
3  * @file
4  * Contains \Drupal\bootstrap\Plugin\Setting\JavaScript\Modals\ModalSize.
5  */
6
7 namespace Drupal\bootstrap\Plugin\Setting\JavaScript\Modals;
8
9 use Drupal\bootstrap\Annotation\BootstrapSetting;
10 use Drupal\bootstrap\Plugin\Setting\SettingBase;
11 use Drupal\Core\Annotation\Translation;
12
13 /**
14  * The "modal_size" theme setting.
15  *
16  * @ingroup plugins_setting
17  *
18  * @BootstrapSetting(
19  *   id = "modal_size",
20  *   type = "select",
21  *   title = @Translation("Default modal size"),
22  *   defaultValue = "",
23  *   description = @Translation("Defines the modal size between the default, <code>modal-sm</code> and <code>modal-lg</code>."),
24  *   empty_option = @Translation("Normal"),
25  *   groups = {
26  *     "javascript" = @Translation("JavaScript"),
27  *     "modals" = @Translation("Modals"),
28  *     "options" = @Translation("Options"),
29  *   },
30  *   options = {
31  *     "modal-sm" = @Translation("Small"),
32  *     "modal-lg" = @Translation("Large"),
33  *   },
34  * )
35  */
36 class ModalSize extends SettingBase {
37
38   /**
39    * {@inheritdoc}
40    */
41   public function drupalSettings() {
42     return !!$this->theme->getSetting('modal_enabled');
43   }
44
45 }