class ModalJqueryUIBridge

The "modal_jquery_ui_bridge" theme setting.

Plugin annotation

@BootstrapSetting(
  id = "modal_jquery_ui_bridge",
  type = "checkbox",
  title = @Translation("jQuery UI Bridge"),
  description = @Translation("Enabling this replaces the core/jquery.ui.dialog dependency in the core/drupal.dialog library with a bridge. This bridge adds support to Bootstrap Modals so that it may interpret jQuery UI Dialog functionality. It is highly recommended that this remain enabled unless you know what you're really doing."),
  defaultValue = 1,
  weight = 0,
  groups = {
    "javascript" = @Translation("JavaScript"),
    "modals" = @Translation("Modals"),
  },
)

Hierarchy

Expanded class hierarchy of ModalJqueryUIBridge

Related topics

Namespace

Drupal\bootstrap\Plugin\Setting\JavaScript\Modals
Source
class ModalJqueryUIBridge extends SettingBase {

  /**
   * {@inheritdoc}
   */
  public function alterFormElement(Element $form, FormStateInterface $form_state, $form_id = NULL) {
    parent::alterFormElement($form, $form_state, $form_id);
    $setting = $this->getSettingElement($form, $form_state);
    $setting->setProperty('states', [
      'visible' => [
        ':input[name="modal_enabled"]' => ['checked' => TRUE],
      ],
    ]);
  }

  /**
   * {@inheritdoc}
   */
  public function getCacheTags() {
    return ['rendered', 'library_info'];
  }

}

Members

Contains filters are case sensitive
Name Modifiers Type Description
ModalJqueryUIBridge::alterFormElement public function The alter method to store the code. Overrides SettingBase::alterFormElement
ModalJqueryUIBridge::getCacheTags public function The cache tags associated with this object. Overrides SettingBase::getCacheTags
PluginBase::$theme protected property The currently set theme object.
PluginBase::__construct public function
SettingBase::alterForm public function The alter method to store the code. Overrides FormInterface::alterForm
SettingBase::drupalSettings public function Determines whether a theme setting should added to drupalSettings. Overrides SettingInterface::drupalSettings
SettingBase::getDefaultValue public function Retrieves the setting's default value. Overrides SettingInterface::getDefaultValue
SettingBase::getElement Deprecated public function Overrides SettingInterface::getElement
SettingBase::getElementProperties public function Retrieves all the form properties from the setting definition.
SettingBase::getGroup Deprecated public function Overrides SettingInterface::getGroup
SettingBase::getGroupElement public function Retrieves the group form element the setting belongs to. Overrides SettingInterface::getGroupElement
SettingBase::getGroups public function Retrieves the setting's groups. Overrides SettingInterface::getGroups
SettingBase::getOptions public function Retrieves the settings options, if set. Overrides SettingInterface::getOptions
SettingBase::getSettingElement public function Retrieves the form element for the setting. Overrides SettingInterface::getSettingElement
SettingBase::getTitle public function Retrieves the setting's human-readable title. Overrides SettingInterface::getTitle
SettingBase::submitForm public static function Form submission handler. Overrides FormInterface::submitForm
SettingBase::submitFormElement public static function Form submission handler. Overrides FormInterface::submitFormElement
SettingBase::validateForm public static function Form validation handler. Overrides FormInterface::validateForm
SettingBase::validateFormElement public static function Form validation handler. Overrides FormInterface::validateFormElement