file TooltipHtml.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_html" theme setting.
  6. *
  7. * @ingroup plugins_setting
  8. *
  9. * @BootstrapSetting(
  10. * id = "tooltip_html",
  11. * type = "checkbox",
  12. * title = @Translation("HTML"),
  13. * description = @Translation("Insert HTML into the tooltip. If false, jQuery's text method will be used to insert content into the DOM. Use text if you're worried about XSS attacks."),
  14. * defaultValue = 0,
  15. * groups = {
  16. * "javascript" = @Translation("JavaScript"),
  17. * "tooltips" = @Translation("Tooltips"),
  18. * "options" = @Translation("Options"),
  19. * },
  20. * )
  21. */
  22. class TooltipHtml extends SettingBase {
  23. /**
  24. * {@inheritdoc}
  25. */
  26. public function drupalSettings() {
  27. return !!$this->theme->getSetting('tooltip_enabled');
  28. }
  29. }

Classes

Name Description
TooltipHtml The "tooltip_html" theme setting.