file PopoverAutoClose.php

Namespace

Drupal\bootstrap\Plugin\Setting\JavaScript\Popovers
  1. <?php
  2. namespace Drupal\bootstrap\Plugin\Setting\JavaScript\Popovers;
  3. use Drupal\bootstrap\Plugin\Setting\SettingBase;
  4. /**
  5. * The "popover_trigger_autoclose" theme setting.
  6. *
  7. * @ingroup plugins_setting
  8. *
  9. * @BootstrapSetting(
  10. * id = "popover_auto_close",
  11. * type = "checkbox",
  12. * title = @Translation("autoClose"),
  13. * description = @Translation("If enabled, the active popover will automatically close when it loses focus, when a click occurs anywhere in the DOM (outside the popover), the escape key (ESC) is pressed or when another popover is opened."),
  14. * defaultValue = 1,
  15. * groups = {
  16. * "javascript" = @Translation("JavaScript"),
  17. * "popovers" = @Translation("Popovers"),
  18. * "options" = @Translation("Options"),
  19. * },
  20. * )
  21. */
  22. class PopoverAutoClose extends SettingBase {
  23. /**
  24. * {@inheritdoc}
  25. */
  26. public function drupalSettings() {
  27. return !!$this->theme->getSetting('popover_enabled');
  28. }
  29. }

Classes

Name Description
PopoverAutoClose The "popover_trigger_autoclose" theme setting.