\TbSwitch

## Class TbToggleButton

Summary

Methods
Properties
Constants
run()
$form
$events
$options
No constants found
registerClientScript()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$form

$form : \TbActiveForm

Type

\TbActiveForm — when created via TbActiveForm, this attribute is set to the form that renders the widget

$events

$events : array

Type

array — the javascript events Example: <pre> 'events'=>array( 'switchChange'=>'js:function(event, state) { console.log(this); // DOM element console.log(event); // jQuery event console.log(state); // true | false }' ) </pre>

$options

$options : array

js widget options

Type

array — to contain the widget js options

Methods

run()

run()

Widget's run function

registerClientScript()

registerClientScript(integer $id)

Registers required css and js files

Parameters

integer $id

the id of the toggle button