ec9a8595fe6b99f34454b934569bc67cea63e6dc
[yaffs-website] / web / themes / contrib / bootstrap / src / Plugin / Setting / JavaScript / Popovers / PopoverTriggerAutoclose.php
1 <?php
2 /**
3  * @file
4  * Contains \Drupal\bootstrap\Plugin\Setting\JavaScript\Popovers\PopoverTriggerAutoclose.
5  */
6
7 namespace Drupal\bootstrap\Plugin\Setting\JavaScript\Popovers;
8
9 use Drupal\bootstrap\Annotation\BootstrapSetting;
10 use Drupal\bootstrap\Plugin\Setting\SettingBase;
11 use Drupal\Core\Annotation\Translation;
12
13 /**
14  * The "popover_trigger_autoclose" theme setting.
15  *
16  * @ingroup plugins_setting
17  *
18  * @BootstrapSetting(
19  *   id = "popover_trigger_autoclose",
20  *   type = "checkbox",
21  *   title = @Translation("Auto-close on document click"),
22  *   description = @Translation("Will automatically close the current popover if a click occurs anywhere else other than the popover element."),
23  *   defaultValue = 1,
24  *   groups = {
25  *     "javascript" = @Translation("JavaScript"),
26  *     "popovers" = @Translation("Popovers"),
27  *     "options" = @Translation("Options"),
28  *   },
29  * )
30  */
31 class PopoverTriggerAutoclose extends SettingBase {
32
33   /**
34    * {@inheritdoc}
35    */
36   public function drupalSettings() {
37     return !!$this->theme->getSetting('popover_enabled');
38   }
39
40 }