PHP Class WhSwitch

See also: https://github.com/nostalgiaz/bootstrap-switch
Author: Antonio Ramirez ([email protected])
Inheritance: extends CInputWidget
Mostrar archivo Open project: 2amigos/yiiwheels

Public Properties

Property Type Description
$animated whether the slide is animated or not.
$debugMode whether to display minified versions of the files or not
$events the JavaScript event handlers.
$inputType input type. It can be 'radio' or 'checkbox'
$offColor color when is off. It can be any of bootstrap button states. Defaults to 'warning'.
$offLabel the label when is off. Defaults to 'Off'.
$onColor color when is on. It can be any of bootstrap button states. Defaults to 'primary'.
$onLabel the label when is on. Defaults to 'On'.
$size size of switch button. Supports 'large', 'small' or 'mini'
$textLabel the text label. Defaults to null.

Protected Properties

Property Type Description
$pluginOptions the switch plugin options.

Public Methods

Method Description
init ( ) Initializes the widget.
registerClientScript ( ) Registers required client script for bootstrap typeahead. It is not used through bootstrap->registerPlugin in order to attach events if any
renderField ( ) Renders the typeahead field
run ( ) Runs the widget.

Method Details

init() public method

Initializes the widget.
public init ( )

registerClientScript() public method

Registers required client script for bootstrap typeahead. It is not used through bootstrap->registerPlugin in order to attach events if any

renderField() public method

Renders the typeahead field
public renderField ( )

run() public method

Runs the widget.
public run ( )

Property Details

$animated public_oe property

whether the slide is animated or not.
public $animated

$debugMode public_oe property

whether to display minified versions of the files or not
public $debugMode

$events public_oe property

the JavaScript event handlers.
public $events

$inputType public_oe property

input type. It can be 'radio' or 'checkbox'
public $inputType

$offColor public_oe property

color when is off. It can be any of bootstrap button states. Defaults to 'warning'.
public $offColor

$offLabel public_oe property

the label when is off. Defaults to 'Off'.
public $offLabel

$onColor public_oe property

color when is on. It can be any of bootstrap button states. Defaults to 'primary'.
public $onColor

$onLabel public_oe property

the label when is on. Defaults to 'On'.
public $onLabel

$pluginOptions protected_oe property

the switch plugin options.
protected $pluginOptions

$size public_oe property

size of switch button. Supports 'large', 'small' or 'mini'
public $size

$textLabel public_oe property

the text label. Defaults to null.
public $textLabel