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