PHP Class TbSelect2

See also: http://ivaynberg.github.io/select2/
Inheritance: extends CInputWidget
Show file Open project: yinhe/yincart Class Usage Examples

Public Properties

Property Type Description
$asDropDownList whether to display a dropdown select box or use it for tagging
$data array @param data for generating the list options (value=>display)
$events the JavaScript event handlers.
$form when created via TbActiveForm. This attribute is set to the form that renders the widget
$options
$val the default value.

Public Methods

Method Description
init ( ) ### .init()
registerClientScript ( $id ) ### .registerClientScript()
run ( ) ### .run()

Private Methods

Method Description
setDefaultWidthIfEmpty ( )

Method Details

init() public method

Initializes the widget.
public init ( )

registerClientScript() public method

Registers required client script for bootstrap select2. It is not used through bootstrap->registerPlugin in order to attach events if any
public registerClientScript ( $id )

run() public method

Runs the widget.
public run ( )

Property Details

$asDropDownList public property

whether to display a dropdown select box or use it for tagging
public $asDropDownList

$data public property

@param data for generating the list options (value=>display)
public array $data
return array

$events public property

the JavaScript event handlers.
public $events

$form public property

when created via TbActiveForm. This attribute is set to the form that renders the widget
public $form

$options public property

public $options

$val public property

the default value.
public $val