Properties

$enableCdn

$enableCdn : boolean

Type

boolean — Whether to use CDN server URLs for assets. Note that not all assets will be served from CDN and we are using several public CDN servers, not some single private one. Consult with the packages configuration to discover precisely which assets will be served from CDN.

$coreCss

$coreCss : boolean

Type

boolean — Whether to register any CSS at all. Defaults to true.

$bootstrapCss

$bootstrapCss : boolean

Type

boolean — Whether to register the Bootstrap core CSS (bootstrap.min.css). Defaults to true.

$responsiveCss

$responsiveCss : boolean

Type

boolean — whether to register the Bootstrap responsive CSS (bootstrap-responsive.min.css). Defaults to false.

$disableZooming

$disableZooming : boolean

Type

boolean — whether to disable zooming capabilities on mobile devices Defaults to false

$fontAwesomeCss

$fontAwesomeCss : boolean

Type

boolean — Whether to register the Font Awesome CSS (font-awesome.min.css). Defaults to false. Note that FontAwesome does not include some of the Twitter Bootstrap built-in icons!

$minify

$minify : bool

Type

bool — Whether to use minified CSS and Javascript files. Default to true.

$yiiCss

$yiiCss : boolean

Type

boolean — Whether to register YiiBooster custom CSS overrides providing compatibility between various parts of the system.

$jqueryCss

$jqueryCss : boolean

Type

boolean — Whether to register the JQuery-specific CSS missing from Bootstrap.

$enableJS

$enableJS : boolean

Type

boolean — Whether to register jQuery and the Bootstrap JavaScript.

$enableBootboxJS

$enableBootboxJS : bool

Type

bool — Whether to enable bootbox messages or not. Default value is true.

$enableNotifierJS

$enableNotifierJS : bool

Type

bool — Whether to enable bootstrap notifier. Defaults to true.

$ajaxCssLoad

$ajaxCssLoad : boolean

Type

boolean — to register Bootstrap CSS files in AJAX requests Defaults to false and you probably have no reason to set it to true.

$ajaxJsLoad

$ajaxJsLoad : boolean

Type

boolean — to register the Bootstrap JavaScript files in AJAX requests Defaults to false and you probably have no reason to set it to true.

$forceCopyAssets

$forceCopyAssets : bool|null

Type

bool|null — Whether to republish assets on each request. If set to true, all YiiBooster assets will be republished on each request. Passing null to this option restores the default handling of CAssetManager of YiiBooster assets.

$enablePopover

$enablePopover

$enableTooltip

$enableTooltip

$popoverSelector

$popoverSelector : string

Type

string — Default popover target CSS selector.

$tooltipSelector

$tooltipSelector : string

Type

string — default tooltip CSS selector.

$packages

$packages : array

Type

array — list of script packages (name=>package spec). This property keeps a list of named script packages, each of which can contain a set of CSS and/or JavaScript script files, and their dependent package names. By calling {@link registerPackage}, one can register a whole package of client scripts together with their dependent packages and render them in the HTML output.

$cs

$cs : \CClientScript

Type

\CClientScript — Something which can register assets for later inclusion on page. For now it's just the `Yii::app()->clientScript`

$_assetsUrl

$_assetsUrl : string

Type

string — handles the assets folder path.

$_instance

$_instance : \Booster

Type

\Booster

Methods

init()

init()

Initializes the component.

registerYiiCss()

registerYiiCss()

Register our overrides for jQuery UI + Twitter Bootstrap 2.3 combo

registerJQueryCss()

registerJQueryCss()

Register the compatibility layer for jQuery UI + Twitter Bootstrap 2.3 combo

getVersion()

getVersion() : string

Returns the extension version number.

Returns

string —

the version

registerPackage()

registerPackage(string $name) : \CClientScript

Registers a script package that is listed in {@link packages}.

Parameters

string $name

the name of the script package.

Returns

\CClientScript —

the CClientScript object itself (to support method chaining, available since version 1.1.5).

registerAssetCss()

registerAssetCss(string $name, string $media)

Registers a CSS file in the asset's css folder

Parameters

string $name

the css file name to register

string $media

media that the CSS file should be applied to. If empty, it means all media types.

registerAssetJs()

registerAssetJs(string $name, int $position)

Register a javascript file in the asset's js folder

Parameters

string $name

the js file name to register

int $position

the position of the JavaScript code.

getAssetsUrl()

getAssetsUrl() : string

Returns the URL to the published assets folder.

Returns

string —

an absolute URL to the published asset

registerBootstrapCss()

registerBootstrapCss()

registerFontAwesomeCss()

registerFontAwesomeCss()

Registers the Font Awesome CSS.

registerPopoverJs()

registerPopoverJs()

registerTooltipJs()

registerTooltipJs()

getUniqueScriptId()

getUniqueScriptId() : string

Generates a "somewhat" random id string.

Returns

string

setBooster()

setBooster(\Bootstrap $value)

Parameters

\Bootstrap $value

getBooster()

getBooster() : \Bootstrap

Returns

\Bootstrap

isInConsoleMode()

isInConsoleMode() : bool

Returns

bool

isInTests()

isInTests() : bool

Returns

bool

setRootAliasIfUndefined()

setRootAliasIfUndefined()

includeAssets()

includeAssets()

appendUserSuppliedPackagesToOurs()

appendUserSuppliedPackagesToOurs()

addOurPackagesToYii()

addOurPackagesToYii()

registerCssPackagesIfEnabled()

registerCssPackagesIfEnabled()

If we did not disabled registering CSS packages, register them.

registerJsPackagesIfEnabled()

registerJsPackagesIfEnabled()

If `enableJS` is not `false`, register our Javascript packages

setAssetsRegistryIfNotDefined()

setAssetsRegistryIfNotDefined()

createBootstrapCssPackage()

createBootstrapCssPackage() : array

We use the values of $this->responsiveCss, $this->fontAwesomeCss, $this->minify and $this->enableCdn to construct the proper package definition and install and register it.

Returns

array

createSelect2Package()

createSelect2Package() : array

Make select2 package definition

Returns

array

registerMetadataForResponsive()

registerMetadataForResponsive()

Required metadata for responsive CSS to work.

tryGetSelectorForPlugin()

tryGetSelectorForPlugin(mixed $name) : mixed

Parameters

mixed $name

Returns

mixed

tryGetOptionsForPlugin()

tryGetOptionsForPlugin(mixed $name) : mixed

Parameters

mixed $name

Returns

mixed