Class TbWidget
Bootstrap widget behavior.
-
CBehavior
-
TbWidget
Methods summary
public
string
|
#
resolveId( string $id = null )
Returns the widget id and copies it to HTML attributes or vice versa.
Returns the widget id and copies it to HTML attributes or vice versa.
Parameters
- $id
string $id the widget id.
Returns
string the widget id.
|
public
string
|
#
publishAssets( string $path, boolean $forceCopy = false )
Publishes an asset path.
Parameters
- $path
string $path the assets path.
- $forceCopy
boolean $forceCopy whether we should copy the asset files even if they are already
published before.
Returns
string the url.
Throws
CException if the asset manager cannot be located.
|
public
|
#
registerCssFile( string $url, string $media = '' )
Registers a CSS file.
Parameters
- $url
string $url URL of the CSS file.
- $media
string $media media that the CSS file should be applied to.
|
public
|
#
registerScriptFile( string $url, integer $position = null )
Registers a JavaScript file.
Registers a JavaScript file.
Parameters
- $url
string $url URL of the javascript file.
- $position
integer $position the position of the JavaScript code.
|
public
string
|
#
resolveScriptVersion( string $filename, boolean $minified = false )
Returns the name of the correct script file to use.
Returns the name of the correct script file to use.
Parameters
- $filename
string $filename the base file name.
- $minified
boolean $minified whether to include the minified version (defaults to false).
Returns
string the full filename.
|
public
boolean
|
#
registerPlugin( string $name, string $selector, array $options = array(), integer $position = CClientScript::POS_END )
Registers the given plugin with the API.
Registers the given plugin with the API.
Parameters
- $name
string $name the plugin name.
- $selector
string $selector the CSS selector.
- $options
array $options the JavaScript options for the plugin.
- $position
integer $position the position of the JavaScript code.
Returns
boolean whether the plugin was registered.
|
public
boolean
|
#
registerEvents( string $selector, string[] $events, integer $position = CClientScript::POS_END )
Registers plugin events with the API.
Registers plugin events with the API.
Parameters
- $selector
string $selector the CSS selector.
- $events
string[] $events the JavaScript event configuration (name=>handler).
- $position
integer $position the position of the JavaScript code.
Returns
boolean whether the events were registered.
|
protected
TbApi
|
#
getApi( )
Returns the API instance.
Returns the API instance.
Returns
|
protected
CClientScript
|
#
getClientScript( )
Returns the client script component.
Returns the client script component.
Returns
CClientScript the component.
|
Magic properties summary
public
mixed
|
$owner
|
|