Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Référence de la classe JHtmlBootstrap

Fonctions membres publiques statiques

static affix ($selector='affix', $params=array())
 
static alert ($selector='alert')
 
static button ($selector='button')
 
static carousel ($selector='carousel', $params=array())
 
static dropdown ($selector='dropdown-toggle')
 
static framework ($debug=null)
 
static modal ($selector='modal', $params=array())
 
static renderModal ($selector='modal', $params=array(), $body='')
 
static popover ($selector='.hasPopover', $params=array())
 
static scrollspy ($selector='navbar', $params=array())
 
static tooltip ($selector='.hasTooltip', $params=array())
 
static tooltipExtended ($extended=true)
 
static typeahead ($selector='.typeahead', $params=array())
 
static startAccordion ($selector='myAccordian', $params=array())
 
static endAccordion ()
 
static addSlide ($selector, $text, $id, $class='')
 
static endSlide ()
 
static startTabSet ($selector='myTab', $params=array())
 
static endTabSet ()
 
static addTab ($selector, $id, $title)
 
static endTab ()
 
static startPane ($selector='myTab', $params=array())
 
static endPane ()
 
static addPanel ($selector, $id)
 
static endPanel ()
 
static loadCss ($includeMainCss=true, $direction='ltr', $attribs=array())
 

Attributs protégés statiques

static $loaded = array()
 

Description détaillée

Utility class for Bootstrap elements.

Depuis
3.0

Documentation des fonctions membres

◆ addPanel()

static addPanel (   $selector,
  $id 
)
static

Begins the display of a new tab content panel.

Paramètres
string$selectorIdentifier of the panel.
string$idThe ID of the div element
Renvoie
string HTML to start a new panel
Depuis
3.0
Obsolète:
4.0 Use JHtml::_('bootstrap.addTab') instead.

Références $active, $id, et $selector.

◆ addSlide()

static addSlide (   $selector,
  $text,
  $id,
  $class = '' 
)
static

Begins the display of a new accordion slide.

Paramètres
string$selectorIdentifier of the accordion group.
string$textText to display.
string$idIdentifier of the slide.
string$classClass of the accordion group.
Renvoie
string HTML to add the slide
Depuis
3.0

Références $class, $html, $id, $selector, et $text.

◆ addTab()

static addTab (   $selector,
  $id,
  $title 
)
static

Begins the display of a new tab content panel.

Paramètres
string$selectorIdentifier of the panel.
string$idThe ID of the div element
string$titleThe title text for the new UL tab
Renvoie
string HTML to start a new panel
Depuis
3.1

Références $active, $id, $selector, $title, getDocument, et null.

◆ affix()

static affix (   $selector = 'affix',
  $params = array() 
)
static

Add javascript support for the Bootstrap affix plugin

Paramètres
string$selectorUnique selector for the element to be affixed.
array$paramsAn array of options. Options for the affix plugin can be:
  • offset number|function|object Pixels to offset from screen when calculating position of scroll. If a single number is provided, the offset will be applied in both top and left directions. To listen for a single direction, or multiple unique offsets, just provide an object offset: { x: 10 }. Use a function when you need to dynamically provide an offset (useful for some responsive designs).
Renvoie
void
Depuis
3.1
Obsolète:
4.0 Bootstrap 4.0 dropped this so will Joomla.

Références $options, $params, $selector, getDocument, et json_encode.

◆ alert()

static alert (   $selector = 'alert')
static

Add javascript support for Bootstrap alerts

Paramètres
string$selectorCommon class for the alerts
Renvoie
void
Depuis
3.0

Références $selector, getDocument, et json_encode.

◆ button()

static button (   $selector = 'button')
static

Add javascript support for Bootstrap buttons

Paramètres
string$selectorCommon class for the buttons
Renvoie
void
Depuis
3.1

Références $selector, getDocument, et json_encode.

◆ carousel()

static carousel (   $selector = 'carousel',
  $params = array() 
)
static

Add javascript support for Bootstrap carousels

Paramètres
string$selectorCommon class for the carousels.
array$paramsAn array of options for the carousel. Options for the carousel can be:
  • interval number The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.
  • pause string Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave.
Renvoie
void
Depuis
3.0

Références $options, $params, $selector, getDocument, et json_encode.

◆ dropdown()

static dropdown (   $selector = 'dropdown-toggle')
static

Add javascript support for Bootstrap dropdowns

Paramètres
string$selectorCommon class for the dropdowns
Renvoie
void
Depuis
3.0

Références $selector, getDocument, et json_encode.

◆ endAccordion()

static endAccordion ( )
static

Close the current accordion

Renvoie
string HTML to close the accordian
Depuis
3.0

◆ endPane()

static endPane ( )
static

Close the current tab pane

Renvoie
string HTML to close the pane
Depuis
3.0
Obsolète:
4.0 Use JHtml::_('bootstrap.endTabSet') instead.

◆ endPanel()

static endPanel ( )
static

Close the current tab content panel

Renvoie
string HTML to close the pane
Depuis
3.0
Obsolète:
4.0 Use JHtml::_('bootstrap.endTab') instead.

◆ endSlide()

static endSlide ( )
static

Close the current slide

Renvoie
string HTML to close the slide
Depuis
3.0

◆ endTab()

static endTab ( )
static

Close the current tab content panel

Renvoie
string HTML to close the pane
Depuis
3.1

◆ endTabSet()

static endTabSet ( )
static

Close the current tab pane

Renvoie
string HTML to close the pane
Depuis
3.1

◆ framework()

static framework (   $debug = null)
static

Method to load the Bootstrap JavaScript framework into the document head

If debugging mode is on an uncompressed version of Bootstrap is included for easier debugging.

Paramètres
mixed$debugIs debugging mode on? [optional]
Renvoie
void
Depuis
3.0

Références JDEBUG, et null.

◆ loadCss()

static loadCss (   $includeMainCss = true,
  $direction = 'ltr',
  $attribs = array() 
)
static

Loads CSS files needed by Bootstrap

Paramètres
boolean$includeMainCssIf true, main bootstrap.css files are loaded
string$directionrtl or ltr direction. If empty, ltr is assumed
array$attribsOptional array of attributes to be passed to JHtml::_('stylesheet')
Renvoie
void
Depuis
3.0

Références $attribs, et $direction.

◆ modal()

static modal (   $selector = 'modal',
  $params = array() 
)
static

Add javascript support for Bootstrap modals

Paramètres
string$selectorThe ID selector for the modal.
array$paramsAn array of options for the modal. Options for the modal can be:
  • backdrop boolean Includes a modal-backdrop element.
  • keyboard boolean Closes the modal when escape key is pressed.
  • show boolean Shows the modal when initialized.
  • remote string An optional remote URL to load
Renvoie
void
Depuis
3.0
Obsolète:
4.0 This method was used by the old renderModal() implementation. Since the new implementation it is unneeded and the broken JS it was injecting could create issues As a case, please see: https://github.com/joomla/joomla-cms/pull/6918

Références $options, $params, $selector, getDocument, et json_encode.

◆ popover()

static popover (   $selector = '.hasPopover',
  $params = array() 
)
static

Add javascript support for Bootstrap popovers

Use element's Title as popover content

Paramètres
string$selectorSelector for the popover
array$paramsAn array of options for the popover. Options for the popover can be: animation boolean apply a css fade transition to the popover html boolean Insert HTML into the popover. If false, jQuery's text method will be used to insert content into the dom. placement string|function how to position the popover - top | bottom | left | right selector string If a selector is provided, popover objects will be delegated to the specified targets. trigger string how popover is triggered - hover | focus | manual title string|function default title value if title tag isn't present content string|function default content value if data-content attribute isn't present delay number|object delay showing and hiding the popover (ms) - does not apply to manual trigger type If a number is supplied, delay is applied to both hide/show Object structure is: delay: { show: 500, hide: 100 } container string|boolean Appends the popover to a specific element: { container: 'body' }
Renvoie
void
Depuis
3.0

Références $options, $params, $selector, getDocument, json_encode, et null.

◆ renderModal()

static renderModal (   $selector = 'modal',
  $params = array(),
  $body = '' 
)
static

Method to render a Bootstrap modal

Paramètres
string$selectorThe ID selector for the modal.
array$paramsAn array of options for the modal. Options for the modal can be:
  • title string The modal title
  • backdrop mixed A boolean select if a modal-backdrop element should be included (default = true) The string 'static' includes a backdrop which doesn't close the modal on click.
  • keyboard boolean Closes the modal when escape key is pressed (default = true)
  • closeButton boolean Display modal close button (default = true)
  • animation boolean Fade in from the top of the page (default = true)
  • footer string Optional markup for the modal footer
  • url string URL of a resource to be inserted as an <iframe> inside the modal body
  • height string height of the <iframe> containing the remote resource
  • width string width of the <iframe> containing the remote resource
string$bodyMarkup for the modal body. Appended after the <iframe> if the URL option is set
Renvoie
string HTML markup for a modal
Depuis
3.0

Références $params, et $selector.

◆ scrollspy()

static scrollspy (   $selector = 'navbar',
  $params = array() 
)
static

Add javascript support for Bootstrap ScrollSpy

Paramètres
string$selectorThe ID selector for the ScrollSpy element.
array$paramsAn array of options for the ScrollSpy. Options for the ScrollSpy can be:
  • offset number Pixels to offset from top when calculating position of scroll.
Renvoie
void
Depuis
3.0

Références $options, $params, $selector, getDocument, et json_encode.

◆ startAccordion()

static startAccordion (   $selector = 'myAccordian',
  $params = array() 
)
static

Add javascript support for Bootstrap accordions and insert the accordion

Paramètres
string$selectorThe ID selector for the tooltip.
array$paramsAn array of options for the tooltip. Options for the tooltip can be:
  • parent selector If selector then all collapsible elements under the specified parent will be closed when this collapsible item is shown. (similar to traditional accordion behavior)
  • toggle boolean Toggles the collapsible element on invocation
  • active string Sets the active slide during load
  • onShow function This event fires immediately when the show instance method is called.
  • onShown function This event is fired when a collapse element has been made visible to the user (will wait for css transitions to complete).
  • onHide function This event is fired immediately when the hide method has been called.
  • onHidden function This event is fired when a collapse element has been hidden from the user (will wait for css transitions to complete).
Renvoie
string HTML for the accordian
Depuis
3.0

Références $options, $params, $script, $selector, getDocument, et null.

◆ startPane()

static startPane (   $selector = 'myTab',
  $params = array() 
)
static

Creates a tab pane

Paramètres
string$selectorThe pane identifier.
array$paramsThe parameters for the pane
Renvoie
string
Depuis
3.0
Obsolète:
4.0 Use JHtml::_('bootstrap.startTabSet') instead.

Références $params, $selector, getDocument, et json_encode.

◆ startTabSet()

static startTabSet (   $selector = 'myTab',
  $params = array() 
)
static

Creates a tab pane

Paramètres
string$selectorThe pane identifier.
array$paramsThe parameters for the pane
Renvoie
string
Depuis
3.1

Références $params, $selector, et getDocument.

◆ tooltip()

static tooltip (   $selector = '.hasTooltip',
  $params = array() 
)
static

Add javascript support for Bootstrap tooltips

Add a title attribute to any element in the form title="title::text"

Paramètres
string$selectorThe ID selector for the tooltip.
array$paramsAn array of options for the tooltip. Options for the tooltip can be:
  • animation boolean Apply a CSS fade transition to the tooltip
  • html boolean Insert HTML into the tooltip. If false, jQuery's text method will be used to insert content into the dom.
  • placement string|function How to position the tooltip - top | bottom | left | right
  • selector string If a selector is provided, tooltip objects will be delegated to the specified targets.
  • title string|function Default title value if title tag isn't present
  • trigger string How tooltip is triggered - hover | focus | manual
  • delay integer Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type If a number is supplied, delay is applied to both hide/show Object structure is: delay: { show: 500, hide: 100 }
  • container string|boolean Appends the popover to a specific element: { container: 'body' }
Renvoie
void
Depuis
3.0

Références $options, $params, $script, $selector, getDocument, json_encode, et null.

◆ tooltipExtended()

static tooltipExtended (   $extended = true)
static

Loads js and css files needed by Bootstrap Tooltip Extended plugin

Paramètres
boolean$extendedIf true, bootstrap-tooltip-extended.js and .css files are loaded
Renvoie
void
Depuis
3.6
Obsolète:
4.0 No replacement, use Bootstrap tooltips.

◆ typeahead()

static typeahead (   $selector = '.typeahead',
  $params = array() 
)
static

Add javascript support for Bootstrap typeahead

Paramètres
string$selectorThe selector for the typeahead element.
array$paramsAn array of options for the typeahead element. Options for the tooltip can be:
  • source array, function The data source to query against. May be an array of strings or a function. The function is passed two arguments, the query value in the input field and the process callback. The function may be used synchronously by returning the data source directly or asynchronously via the process callback's single argument.
  • items number The max number of items to display in the dropdown.
  • minLength number The minimum character length needed before triggering autocomplete suggestions
  • matcher function The method used to determine if a query matches an item. Accepts a single argument, the item against which to test the query. Access the current query with this.query. Return a boolean true if query is a match.
  • sorter function Method used to sort autocomplete results. Accepts a single argument items and has the scope of the typeahead instance. Reference the current query with this.query.
  • updater function The method used to return selected item. Accepts a single argument, the item and has the scope of the typeahead instance.
  • highlighter function Method used to highlight autocomplete results. Accepts a single argument item and has the scope of the typeahead instance. Should return html.
Renvoie
void
Depuis
3.0
Obsolète:
4.0 Bootstrap 4.0 dropped this so will Joomla.

Références $options, $params, $selector, getDocument, json_encode, et null.

Documentation des champs

◆ $loaded

$loaded = array()
staticprotected

La documentation de cette classe a été générée à partir du fichier suivant :