3 namespace Drupal\bootstrap\Plugin\Setting\JavaScript\Tooltips;
5 use Drupal\bootstrap\Plugin\Setting\SettingBase;
8 * The "tooltip_placement" theme setting.
10 * @ingroup plugins_setting
13 * id = "tooltip_placement",
15 * title = @Translation("placement"),
16 * description = @Translation("Where to position the tooltip. When <code>auto</code> is specified, it will dynamically reorient the tooltip. For example, if placement is <code>auto left</code>, the tooltip will display to the left when possible, otherwise it will display right."),
17 * defaultValue = "auto left",
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"),
30 * "javascript" = @Translation("JavaScript"),
31 * "tooltips" = @Translation("Tooltips"),
32 * "options" = @Translation("Options"),
36 class TooltipPlacement extends SettingBase {
41 public function drupalSettings() {
42 return !!$this->theme->getSetting('tooltip_enabled');