Version 1
[yaffs-website] / web / themes / contrib / bootstrap / src / Plugin / Setting / JavaScript / Popovers / PopoverSelector.php
1 <?php
2 /**
3  * @file
4  * Contains \Drupal\bootstrap\Plugin\Setting\JavaScript\Popovers\PopoverSelector.
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_selector" theme setting.
15  *
16  * @ingroup plugins_setting
17  *
18  * @BootstrapSetting(
19  *   id = "popover_selector",
20  *   type = "textfield",
21  *   title = @Translation("selector"),
22  *   description = @Translation("If a selector is provided, tooltip objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have popovers added."),
23  *   defaultValue = "",
24  *   groups = {
25  *     "javascript" = @Translation("JavaScript"),
26  *     "popovers" = @Translation("Popovers"),
27  *     "options" = @Translation("Options"),
28  *   },
29  *   see = {
30  *     "https://github.com/twbs/bootstrap/issues/4215" = @Translation("Issue #4215"),
31  *     "http://jsfiddle.net/fScua/" = @Translation("JSFiddle Example"),
32  *   },
33  * )
34  */
35 class PopoverSelector extends SettingBase {
36
37   /**
38    * {@inheritdoc}
39    */
40   public function drupalSettings() {
41     return !!$this->theme->getSetting('popover_enabled');
42   }
43
44 }