Main component features

Global configuration of YiiBooster

At the root of YiiBooster lies the Bootstrap component. Depending on how you set up its loading according to the installation instructions, it is being initialized either on any request or just on which you configured it to.

In any case, Bootstrap has a lot of load-time switches which you can use in your Yii component configuration to control the overall behavior of the library. Here we'll list them all.

Note All of these parameters are meaningful only at the time of Bootstrap initialization! If you change them when your app is already running, it will have no effect.

Property Description
boolean enableCdn = false Whether to use the Content Delivery Network URLs for assets which have them. For example, FontAwesome CSS will be loaded from netdna.bootstrapcdn.com if this property set to true.
boolean coreCss = true

volatile Whether to register any CSS at all. If set to false, you get no CSS files from YiiBooster registered on your page. This can be useful if, for example, you use only a subset of YiiBooster and have customized stylesheets for all of it.

boolean bootstrapCss = true Whether to register the base Twitter Bootstrap CSS files. It is especially useful in the presence of projects like Bootswatch.
boolean responsiveCss = true Whether to use responsive layout from Twitter Bootstrap package. It enables a lot of features like navbar collapsing, fluid grids etc. Starting from the version 2.0.0, responsive CSS is the default.
boolean fontAwesomeCss = false

Whether to use icons from FontAwesome package. Base Twitter Bootstrap icons will be replaced with FontAwesome ones.

Note FontAwesome is not a superset of base Twitter Bootstrap icons. Some icons are missing.

boolean minify = true

Whether to use minified CSS and Javascript files. You can set to false if you need to debug something.

Note Note that some 3rd-party libraries used in YiiBooster do not have minified assets at all, so uncompressed ones will be used instead.

boolean yiiCss = true

Whether to register YiiBooster custom CSS overrides which provide compatibility between various parts of the system.

Important You are encouraged to always have this property set to true, as there are so many components in YiiBooster that you really need this additional overrides.

boolean jqueryCss = true Whether to register assets of the jQuery UI Bootstrap project. Defaults to true, as it enables Bootstrap styles for widgets included in Yii, too. You are encouraged to look at the documentation about jQuery UI Bootstrap features here, too.
boolean enableJS = true

Whether to register base Javascript assets.

Note Assets for individual widgets will still be registered when needed. So, you can end up with broken UI if you set this to false.

boolean enableBootboxJS = true Whether to enable bootbox.js library. You are encouraged to look at both original documentation for bootbox project and our documentation about bootbox integration.
boolean enableNotifierJS = true Whether to enable notify.js library. You are encouraged to look at both original documentation for Notify.js and our documentation about notifier integration.

Unreliable Original library has some problems with its documentation website and it was left without any care for a long time in YiiBooster so most possibly it works not as smoothly as we want.

boolean ajaxCssLoad = false Whether to register CSS files in AJAX calls. YiiBooster checks for AJAX calls in Yii style: looking at contents of isAjaxRequest request parameter. Most possibly you have no reason to enable this feature.
boolean ajaxJsLoad = false Whether to register Javascript files in AJAX calls. YiiBooster checks for AJAX calls in Yii style: looking at contents of isAjaxRequest request parameter. Most possibly you have no reason to enable this feature.
boolean|null forceCopyAssets = false Whether to republish assets on each request. If set to true, all YiiBooster assets will be republished on each request. If set to null, assets will be handled according to CAssetManager defaults.
string popoverSelector = "[data-toggle=popover]" CSS selector describing elements which data-title, data-content and data-placement attributes will be used to construct pop-overs for them. Look at the documentation about YiiBooster support of Twitter Bootstrap Popover plugin for details.
string tooltipSelector = "[data-toggle=tooltip]" CSS selector describing elements which title attribute will be used to construct tooltip for them. Look at the documentation about YiiBooster support of Twitter Bootstrap Tooltip plugin for details.
array plugins = array()

Deprecated This attribute was used to set up default selectors and options for separate Javascript plugins used in YiiBooster widgets at load-time, the same way Yii's CWidgetFactory works, but given latest changes in the internal structure of YiiBooster we're dropping support for this feature for now, because it already works for very little subset of plugins.

Note Please note that as it is this feature most possibly is useful, so in future versions it may be returned, maybe in some other form. However, as of future 3.0.0 release, it will be removed from main YiiBooster component.

array packages = array() Internal This is the list of packages used by YiiBooster. Format of this list is identical to the one used in CClientScript.packages. You can add your own packages here, if you want, but please note that probably using Yii built-in is more appropriate. This property is being filled automatically at the initialization time of YiiBooster and it is public only for those who want to extend/subclass this component.
CClientScript assetManager = null Internal This is special property to set up custom asset manager for Bootstrap. This feature currently is under development, and will play an important role in future detaching YiiBooster from dependence on, well, Yii. Currently normal users are not expected to set this property. It is filled by Yii::app()->clientScript at initialization of YiiBooster (if it was not set to something before that).

So, if you managed to read the whole list of properties, you have noticed that it includes settings for five special globally-enabled plugins. You can read about them in the following pages at documentation: jQueryUI Bootstrap, Tooltips, Popovers, Bootbox.js and Notify.js