Version 1
[yaffs-website] / web / themes / contrib / bootstrap / src / Plugin / Setting / JavaScript / Modals / ModalBackdrop.php
1 <?php
2 /**
3  * @file
4  * Contains \Drupal\bootstrap\Plugin\Setting\JavaScript\Modals\ModalBackdrop.
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_backdrop" theme setting.
15  *
16  * @ingroup plugins_setting
17  *
18  * @BootstrapSetting(
19  *   id = "modal_backdrop",
20  *   type = "select",
21  *   title = @Translation("backdrop"),
22  *   description = @Translation("Includes a modal-backdrop element. Alternatively, specify <code>static</code> for a backdrop which doesn't close the modal on click."),
23  *   defaultValue = "true",
24  *   groups = {
25  *     "javascript" = @Translation("JavaScript"),
26  *     "modals" = @Translation("Modals"),
27  *     "options" = @Translation("Options"),
28  *   },
29  *   options = {
30  *     "false" = @Translation("Disabled"),
31  *     "true" = @Translation("Enabled"),
32  *     "static" = @Translation("Static"),
33  *   },
34  * )
35  */
36 class ModalBackdrop extends SettingBase {
37
38   /**
39    * {@inheritdoc}
40    */
41   public function drupalSettings() {
42     return !!$this->theme->getSetting('modal_enabled');
43   }
44
45 }