Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe Bootstrap

Fonctions membres publiques statiques

static alert ($selector='')
 
static button ($selector='')
 
static carousel ($selector='', $params=[])
 
static collapse ($selector='', $params=[])
 
static dropdown ($selector='', $params=[])
 
static modal ($selector='', $options=[])
 
static offcanvas ($selector='', $options=[])
 
static popover ($selector='', $options=[])
 
static scrollspy ($selector='', $options=[])
 
static tab ($selector='', $options=[])
 
static tooltip ($selector='', $options=[])
 
static toast ($selector='', $options=[])
 
static framework ($debug=null)
 
static loadCss ($includeMainCss=true, $direction='ltr', $attribs=[])
 
static startAccordion ($selector='myAccordian', $options=[])
 
static endAccordion ()
 
static addSlide ($selector, $text, $id, $class='')
 
static endSlide ()
 
static renderModal ($selector='modal', $options=[], $body='')
 
static startTabSet ($selector='myTab', $params=[])
 
static endTabSet ()
 
static addTab ($selector, $id, $title)
 
static endTab ()
 

Attributs protégés statiques

static $loaded = []
 

Description détaillée

Utility class for Bootstrap elements.

Depuis
3.0

Documentation des fonctions membres

◆ 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, $id, $selector, $text, et true.

◆ addTab()

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

Begins the display of a new tab content panel.

Paramètres
string$selectorIdentifier of the panel. Expects a valid ID without the #!
string$idThe ID of the div element. Expects a valid ID without the #!
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, et null.

◆ alert()

static alert (   $selector = '')
static

Add javascript support for Bootstrap alerts

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

Références $doc, $options, $selector, Factory\getApplication(), et Factory\getDocument().

◆ button()

static button (   $selector = '')
static

Add javascript support for Bootstrap buttons

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

Références $doc, $options, $selector, Factory\getApplication(), et Factory\getDocument().

◆ carousel()

static carousel (   $selector = '',
  $params = [] 
)
static

Add javascript support for Bootstrap carousels

Paramètres
string$selectorCommon class for the carousels.
array$paramsAn array of options for the carousel.
Renvoie
void
Exceptions

Références $params, $selector, Factory\getApplication(), et Factory\getDocument().

◆ collapse()

static collapse (   $selector = '',
  $params = [] 
)
static

Add javascript support for Bootstrap collapse

Paramètres
string$selectorCommon class for the collapse
string[]$params Additional parameters - see below
Renvoie
void
Exceptions

Références $params, $selector, Factory\getApplication(), et Factory\getDocument().

◆ dropdown()

static dropdown (   $selector = '',
  $params = [] 
)
static

Add javascript support for Bootstrap dropdowns

Paramètres
string$selectorCommon class for the dropdowns
array$paramsThe options for the dropdowns
Renvoie
void
Depuis
4.0.0

Options for the collapse can be:

  • flip boolean true Allow Dropdown to flip in case of an overlapping on the reference element
  • boundary string scrollParent Overflow constraint boundary of the dropdown menu
  • reference string toggle Reference element of the dropdown menu. Accepts 'toggle' or 'parent'
  • display string dynamic By default, we use Popper for dynamic positioning. Disable this with static

Références $params, $selector, Factory\getApplication(), et Factory\getDocument().

◆ endAccordion()

static endAccordion ( )
static

Close the current accordion

Renvoie
string HTML to close the accordion
Depuis
3.0

◆ 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

Références LayoutHelper\render().

◆ endTabSet()

static endTabSet ( )
static

Close the current tab pane

Renvoie
string HTML to close the pane
Depuis
3.1

Références LayoutHelper\render().

◆ framework()

static framework (   $debug = null)
static

Method to load the ALL the Bootstrap Components

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
Obsolète:
5.0

Références $script, $wa, et Factory\getApplication().

◆ loadCss()

static loadCss (   $includeMainCss = true,
  $direction = 'ltr',
  $attribs = [] 
)
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 HTMLHelper::_('stylesheet')
Renvoie
void
Depuis
3.0

Références Factory\getDocument().

◆ modal()

static modal (   $selector = '',
  $options = [] 
)
static

Add javascript support for Bootstrap modal

Paramètres
string$selectorThe ID selector for the modal.
array$optionsAn array of options for the modal.
Renvoie
void
Depuis
4.0.0

Options for the modal can be:

  • backdrop string| true Includes a modal-backdrop element. Alternatively, specify static boolean for a backdrop which doesn't close the modal on click.
  • keyboard boolean true Closes the modal when escape key is pressed
  • focus boolean true Closes the modal when escape key is pressed

Références $options, $selector, Factory\getApplication(), et Factory\getDocument().

◆ offcanvas()

static offcanvas (   $selector = '',
  $options = [] 
)
static

Add javascript support for Bootstrap offcanvas

Paramètres
string$selectorThe ID selector for the offcanvas.
array$optionsAn array of options for the offcanvas.
Renvoie
void
Depuis
4.0.0

Options for the offcanvas can be:

  • backdrop boolean true Apply a backdrop on body while offcanvas is open
  • keyboard boolean true Closes the offcanvas when escape key is pressed
  • scroll boolean false Allow body scrolling while offcanvas is open

Références $options, $selector, Factory\getApplication(), et Factory\getDocument().

◆ popover()

static popover (   $selector = '',
  $options = [] 
)
static

Add javascript support for Bootstrap popovers

Use element's Title as popover content

Paramètres
string$selectorSelector for the popover
array$optionsThe options for the popover
Renvoie
void
Depuis
3.0
  • Options for the popover can be:
  • animation boolean true Apply a CSS fade transition to the popover
  • container string| false Appends the popover to a specific element. Eg.: 'body' boolean
  • content string null Default content value if data-bs-content attribute isn't present
  • delay number 0 Delay showing and hiding the popover (ms) does not apply to manual trigger type
  • html boolean true Insert HTML into the popover. If false, innerText property will be used to insert content into the DOM.
  • placement string right How to position the popover - auto | top | bottom | left | right. When auto is specified, it will dynamically reorient the popover
  • selector string false If a selector is provided, popover objects will be delegated to the specified targets.
  • template string null Base HTML to use when creating the popover.
  • title string null Default title value if title tag isn't present
  • trigger string click How popover is triggered - click | hover | focus | manual
  • offset integer 0 Offset of the popover relative to its target.

Références $options, $selector, Factory\getApplication(), Factory\getDocument(), et null.

◆ renderModal()

static renderModal (   $selector = 'modal',
  $options = [],
  $body = '' 
)
static

Method to render a Bootstrap modal

Paramètres
string$selectorThe ID selector for the modal. Expects a valid ID without the #!
array$optionsAn array of options for the modal.
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

Options for the modal can be:

  • backdrop string| true Includes a modal-backdrop element. Alternatively, specify static boolean for a backdrop which doesn't close the modal on click.
  • keyboard boolean true Closes the modal when escape key is pressed
  • focus boolean true Closes the modal when escape key is pressed
  • title string null The modal title
  • closeButton boolean true Display modal close button (default = true)
  • footer string null Optional markup for the modal footer
  • url string null URL of a resource to be inserted as an <iframe> inside the modal body
  • height string null Height of the <iframe> containing the remote resource
  • width string null Width of the <iframe> containing the remote resource

Références $options, $selector, HTMLHelper\_(), et LayoutHelper\render().

◆ scrollspy()

static scrollspy (   $selector = '',
  $options = [] 
)
static

Add javascript support for Bootstrap Scrollspy

Paramètres
string$selectorThe ID selector for the ScrollSpy element.
array$optionsAn array of options for the ScrollSpy.
Renvoie
void
Depuis
3.0

Options for the Scrollspy can be:

  • offset number Pixels to offset from top when calculating position of scroll.
  • method string Finds which section the spied element is in.
  • target string Specifies element to apply Scrollspy plugin.

Références $options, $selector, Factory\getApplication(), Factory\getDocument(), et null.

◆ startAccordion()

static startAccordion (   $selector = 'myAccordian',
  $options = [] 
)
static

Add javascript support for Bootstrap accordions and insert the accordion

Paramètres
string$selectorThe ID selector for the tooltip. Expects a valid ID without the #!
array$optionsAn array of options for the tooltip.
Renvoie
string HTML for the accordion
Depuis
3.0

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

Références $options, $selector, Factory\getApplication(), et Factory\getDocument().

◆ startTabSet()

static startTabSet (   $selector = 'myTab',
  $params = [] 
)
static

Creates a tab pane

Paramètres
string$selectorThe pane identifier. Expects a valid ID without the #!
array$paramsThe parameters for the pane
Renvoie
string
Depuis
3.1

Références $params, $selector, HTMLHelper\_(), et LayoutHelper\render().

◆ tab()

static tab (   $selector = '',
  $options = [] 
)
static

Add javascript support for Bootstrap tab

Paramètres
string$selectorCommon class for the tabs
array$optionsOptions for the tabs
Renvoie
void
Exceptions

Références $options, $selector, Factory\getApplication(), et Factory\getDocument().

◆ toast()

static toast (   $selector = '',
  $options = [] 
)
static

Add javascript support for Bootstrap toasts

Paramètres
string$selectorCommon class for the toasts
array$optionsOptions for the toasts
Renvoie
void
Exceptions

Références $options, $selector, Factory\getApplication(), Factory\getDocument(), et null.

◆ tooltip()

static tooltip (   $selector = '',
  $options = [] 
)
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$optionsAn array of options for the tooltip.
Renvoie
void
Depuis
3.0
                        Options for the tooltip can be:
  • animation boolean apply a css fade transition to the popover
  • container string|boolean Appends the popover to a specific element: { container: 'body' }
  • 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 }
  • 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.
  • template string Base HTML to use when creating the popover.
  • title string|function default title value if title tag isn't present
  • trigger string how popover is triggered - hover | focus | manual
  • constraints array An array of constraints - passed through to Popper.
  • offset string Offset of the popover relative to its target.

Références $options, $selector, Factory\getApplication(), Factory\getDocument(), et null.

Documentation des champs

◆ $loaded

$loaded = []
staticprotected

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