Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / themes / contrib / bootstrap / src / Plugin / Setting / JavaScript / Popovers / PopoverPlacement.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_placement" theme setting.
9  *
10  * @ingroup plugins_setting
11  *
12  * @BootstrapSetting(
13  *   id = "popover_placement",
14  *   type = "select",
15  *   title = @Translation("placement"),
16  *   description = @Translation("Where to position the popover. When <code>auto</code> is specified, it will dynamically reorient the popover. For example, if placement is <code>auto left</code>, the popover will display to the left when possible, otherwise it will display right."),
17  *   defaultValue = "right",
18  *   options = {
19  *     "top" = @Translation("top"),
20  *     "bottom" = @Translation("bottom"),
21  *     "left" = @Translation("left"),
22  *     "right" = @Translation("right"),
23  *     "auto" = @Translation("auto"),
24  *     "auto top" = @Translation("auto top"),
25  *     "auto bottom" = @Translation("auto bottom"),
26  *     "auto left" = @Translation("auto left"),
27  *     "auto right" = @Translation("auto right"),
28  *   },
29  *   groups = {
30  *     "javascript" = @Translation("JavaScript"),
31  *     "popovers" = @Translation("Popovers"),
32  *     "options" = @Translation("Options"),
33  *   },
34  * )
35  */
36 class PopoverPlacement extends SettingBase {
37
38   /**
39    * {@inheritdoc}
40    */
41   public function drupalSettings() {
42     return !!$this->theme->getSetting('popover_enabled');
43   }
44
45 }