file TooltipPlacement.php

Namespace

Drupal\bootstrap\Plugin\Setting\JavaScript\Tooltips
  1. <?php
  2. namespace Drupal\bootstrap\Plugin\Setting\JavaScript\Tooltips;
  3. use Drupal\bootstrap\Plugin\Setting\SettingBase;
  4. /**
  5. * The "tooltip_placement" theme setting.
  6. *
  7. * @ingroup plugins_setting
  8. *
  9. * @BootstrapSetting(
  10. * id = "tooltip_placement",
  11. * type = "select",
  12. * title = @Translation("placement"),
  13. * 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."),
  14. * defaultValue = "auto left",
  15. * options = {
  16. * "top" = @Translation("top"),
  17. * "bottom" = @Translation("bottom"),
  18. * "left" = @Translation("left"),
  19. * "right" = @Translation("right"),
  20. * "auto" = @Translation("auto"),
  21. * "auto top" = @Translation("auto top"),
  22. * "auto bottom" = @Translation("auto bottom"),
  23. * "auto left" = @Translation("auto left"),
  24. * "auto right" = @Translation("auto right"),
  25. * },
  26. * groups = {
  27. * "javascript" = @Translation("JavaScript"),
  28. * "tooltips" = @Translation("Tooltips"),
  29. * "options" = @Translation("Options"),
  30. * },
  31. * )
  32. */
  33. class TooltipPlacement extends SettingBase {
  34. /**
  35. * {@inheritdoc}
  36. */
  37. public function drupalSettings() {
  38. return !!$this->theme->getSetting('tooltip_enabled');
  39. }
  40. }

Classes

Name Description
TooltipPlacement The "tooltip_placement" theme setting.