data-toggle="e;tooltip"e; attribute set will automatically initialize the tooltip upon page load. WARNING: This feature can sometimes impact performance. Disable if pages appear to "e;hang"e; after initial load."),
* defaultValue = 1,
* weight = -1,
* groups = {
* "javascript" = @Translation("JavaScript"),
* "tooltips" = @Translation("Tooltips"),
* },
* )
*/
class TooltipEnabled extends SettingBase {
/**
* {@inheritdoc}
*/
public function alterFormElement(Element $form, FormStateInterface $form_state, $form_id = NULL) {
parent::alterFormElement($form, $form_state, $form_id);
$group = $this->getGroupElement($form, $form_state);
$group->setProperty('description', t('Inspired by the excellent jQuery.tipsy plugin written by Jason Frame; Tooltips are an updated version, which don\'t rely on images, use CSS3 for animations, and data-attributes for local title storage. See Bootstrap tooltips for more documentation.', [
':url' => 'http://getbootstrap.com/javascript/#tooltips',
]));
}
/**
* {@inheritdoc}
*/
public function drupalSettings() {
return !!$this->theme->getSetting('tooltip_enabled');
}
}