LimeSurvey API - Master branch

TbApi extends CApplicationComponent
in package

Bootstrap API component.

Table of Contents

Constants

PLUGIN_AFFIX  = 'affix'
PLUGIN_ALERT  = 'alert'
PLUGIN_BUTTON  = 'button'
PLUGIN_CAROUSEL  = 'carousel'
PLUGIN_COLLAPSE  = 'collapse'
PLUGIN_DROPDOWN  = 'dropdown'
PLUGIN_MODAL  = 'modal'
PLUGIN_POPOVER  = 'popover'
PLUGIN_SCROLLSPY  = 'scrollspy'
PLUGIN_TAB  = 'tab'
PLUGIN_TOOLTIP  = 'tooltip'
PLUGIN_TRANSITION  = 'transition'
PLUGIN_TYPEAHEAD  = 'typeahead'

Properties

$bootstrapPath  : string
$cdnUrl  : string
$counter  : int
$forceCopyAssets  : bool
$_assetsUrl  : mixed
$_bootstrapUrl  : mixed

Methods

fixPanningAndZooming()  : mixed
Fixes panning and zooming on mobile devices.
init()  : mixed
Initializes this component.
register()  : mixed
Registers all assets.
registerAllCss()  : mixed
Registers all Bootstrap CSS files.
registerAllScripts()  : mixed
Registers all Bootstrap JavaScript files.
registerCoreCss()  : mixed
Registers the Bootstrap CSS.
registerCoreScripts()  : mixed
Registers jQuery and Bootstrap JavaScript.
registerEvents()  : mixed
Registers events using the given selector.
registerPlugin()  : mixed
Registers a specific Bootstrap plugin using the given selector and options.
registerPopover()  : mixed
Registers the Bootstrap Popover plugin.
registerThemeCss()  : mixed
Registers the Bootstrap theme CSS.
registerTooltip()  : mixed
Registers the Bootstrap Tooltip plugin.
registerTooltipAndPopover()  : mixed
Registers the Tooltip and Popover plugins.
registerYiistrapCss()  : mixed
Registers the Yiistrap CSS.
getAssetsUrl()  : string
Returns the url to the published folder that contains the assets for this extension.
getBootstrapUrl()  : string
Returns the url to the published Bootstrap folder, or the CDN if applicable.

Constants

PLUGIN_AFFIX

public mixed PLUGIN_AFFIX = 'affix'

PLUGIN_ALERT

public mixed PLUGIN_ALERT = 'alert'

PLUGIN_BUTTON

public mixed PLUGIN_BUTTON = 'button'
public mixed PLUGIN_CAROUSEL = 'carousel'

PLUGIN_COLLAPSE

public mixed PLUGIN_COLLAPSE = 'collapse'

PLUGIN_DROPDOWN

public mixed PLUGIN_DROPDOWN = 'dropdown'

PLUGIN_MODAL

public mixed PLUGIN_MODAL = 'modal'

PLUGIN_POPOVER

public mixed PLUGIN_POPOVER = 'popover'

PLUGIN_SCROLLSPY

public mixed PLUGIN_SCROLLSPY = 'scrollspy'

PLUGIN_TAB

public mixed PLUGIN_TAB = 'tab'

PLUGIN_TOOLTIP

public mixed PLUGIN_TOOLTIP = 'tooltip'

PLUGIN_TRANSITION

public mixed PLUGIN_TRANSITION = 'transition'

PLUGIN_TYPEAHEAD

public mixed PLUGIN_TYPEAHEAD = 'typeahead'

Properties

$bootstrapPath

public string $bootstrapPath

path to Bootstrap assets (will default to node_modules/bootstrap/dist).

$counter

public static int $counter = 0

static counter, used for determining script identifiers.

$forceCopyAssets

public bool $forceCopyAssets = \false

whether we should copy the asset file or directory even if it is already published before.

$_assetsUrl

private mixed $_assetsUrl

$_bootstrapUrl

private mixed $_bootstrapUrl

Methods

init()

Initializes this component.

public init() : mixed

register()

Registers all assets.

public register() : mixed

registerAllCss()

Registers all Bootstrap CSS files.

public registerAllCss() : mixed

registerAllScripts()

Registers all Bootstrap JavaScript files.

public registerAllScripts() : mixed

registerCoreCss()

Registers the Bootstrap CSS.

public registerCoreCss([string $url = null ][, string $media = 'screen' ]) : mixed
Parameters
$url : string = null

the URL to the CSS file to register.

$media : string = 'screen'

the media type (defaults to 'screen').

registerCoreScripts()

Registers jQuery and Bootstrap JavaScript.

public registerCoreScripts([string $url = null ][, int $position = CClientScript::POS_END ]) : mixed
Parameters
$url : string = null

the URL to the JavaScript file to register.

$position : int = CClientScript::POS_END

the position of the JavaScript code. 20210322: GJ - Commenting the whole method implementation. JS and CSS are not needed and by commenting them, we don't need to mantain them.

registerEvents()

Registers events using the given selector.

public registerEvents(string $selector, array<string|int, string> $events[, int $position = CClientScript::POS_END ]) : mixed
Parameters
$selector : string

the CSS selector.

$events : array<string|int, string>

the JavaScript event configuration (name=>handler).

$position : int = CClientScript::POS_END

the position of the JavaScript code.

registerPlugin()

Registers a specific Bootstrap plugin using the given selector and options.

public registerPlugin(string $name, string $selector[, array<string|int, mixed> $options = array() ][, int $position = CClientScript::POS_END ]) : mixed
Parameters
$name : string

the plugin name.

$selector : string

the CSS selector.

$options : array<string|int, mixed> = array()

the JavaScript options for the plugin.

$position : int = CClientScript::POS_END

the position of the JavaScript code.

registerPopover()

Registers the Bootstrap Popover plugin.

public registerPopover([string $selector = 'body' ][, array<string|int, mixed> $options = array() ]) : mixed
Parameters
$selector : string = 'body'

the CSS selector.

$options : array<string|int, mixed> = array()

the JavaScript options for the plugin.

Tags
see
http://twitter.github.com/bootstrap/javascript.html#popover

registerThemeCss()

Registers the Bootstrap theme CSS.

public registerThemeCss([string $url = null ][, string $media = 'screen' ]) : mixed
Parameters
$url : string = null

the URL to the CSS file to register.

$media : string = 'screen'

the media type (defaults to 'screen').

registerTooltip()

Registers the Bootstrap Tooltip plugin.

public registerTooltip([string $selector = 'body' ][, array<string|int, mixed> $options = array() ]) : mixed
Parameters
$selector : string = 'body'

the CSS selector.

$options : array<string|int, mixed> = array()

the JavaScript options for the plugin.

Tags
see
http://twitter.github.com/bootstrap/javascript.html#tooltip

registerTooltipAndPopover()

Registers the Tooltip and Popover plugins.

public registerTooltipAndPopover() : mixed

registerYiistrapCss()

Registers the Yiistrap CSS.

public registerYiistrapCss([string $url = null ][, string $media = 'screen' ]) : mixed
Parameters
$url : string = null

the URL to the CSS file to register.

$media : string = 'screen'

the media type (default to 'screen').

getAssetsUrl()

Returns the url to the published folder that contains the assets for this extension.

protected getAssetsUrl() : string
Return values
string

the url.

getBootstrapUrl()

Returns the url to the published Bootstrap folder, or the CDN if applicable.

protected getBootstrapUrl() : string
Tags
throws
Exception
Return values
string

the url.


        
On this page

Search results