PHP Class WhToggleButton

Author: Antonio Ramirez ([email protected])
Inheritance: extends CInputWidget
Afficher le fichier Open project: 2amigos/yiiwheels

Méthodes publiques

Свойство Type Description
$animated whether to use animation or not
$customDisabledStyle a custom style for the disabled option. Format
 ...
 'customDisabledStyle'=>array(
     'background'=>'#FF00FF',
     'gradient'=>'#D300D3',
     'color'=>'#FFFFFF'
 ),
 ...
$customEnabledStyle a custom style for the enabled option. Format
 ...
 'customEnabledStyle'=>array(
     'background'=>'#FF00FF',
     'gradient'=>'#D300D3',
     'color'=>'#FFFFFF'
 ),
 ...
$disabledLabel the label to display on the disabled side
$disabledStyle the style of the toggle button disabled style Accepted values ["primary", "danger", "info", "success", "warning"] or nothing
$enabledLabel the label to display on the enabled side
$enabledStyle the style of the toggle button enable style Accepted values ["primary", "danger", "info", "success", "warning"] or nothing
$height the height of the toggle button
$onChange the javascript function The function signature is function($el, status, e)
  • $el the toggle element changed.
  • status the status of the element (true=on | false=off)
  • e the event object
Example:
 array(
    class'=>'WhToggleColumn',
    'onChange'=>'js:function($el, status, e){ console.log($el, status, e); }',
 ),
$tagName the tag name. Defaults to 'div'.
$transitionSpeed the transition speed (toggle movement)
$width the width of the toggle button

Méthodes publiques

Méthode Description
init ( ) Widget's initialization method
renderField ( ) Renders the input field
run ( ) Widget's run function

Méthodes protégées

Méthode Description
getConfiguration ( ) : array
registerClientScript ( ) Registers client scripts

Method Details

getConfiguration() protected méthode

protected getConfiguration ( ) : array
Résultat array the configuration of the plugin

init() public méthode

Widget's initialization method
public init ( )

registerClientScript() protected méthode

Registers client scripts
protected registerClientScript ( )

renderField() public méthode

Renders the input field
public renderField ( )

run() public méthode

Widget's run function
public run ( )

Property Details

$animated public_oe property

whether to use animation or not
public $animated

$customDisabledStyle public_oe property

a custom style for the disabled option. Format
 ...
 'customDisabledStyle'=>array(
     'background'=>'#FF00FF',
     'gradient'=>'#D300D3',
     'color'=>'#FFFFFF'
 ),
 ...
public $customDisabledStyle

$customEnabledStyle public_oe property

a custom style for the enabled option. Format
 ...
 'customEnabledStyle'=>array(
     'background'=>'#FF00FF',
     'gradient'=>'#D300D3',
     'color'=>'#FFFFFF'
 ),
 ...
public $customEnabledStyle

$disabledLabel public_oe property

the label to display on the disabled side
public $disabledLabel

$disabledStyle public_oe property

the style of the toggle button disabled style Accepted values ["primary", "danger", "info", "success", "warning"] or nothing
public $disabledStyle

$enabledLabel public_oe property

the label to display on the enabled side
public $enabledLabel

$enabledStyle public_oe property

the style of the toggle button enable style Accepted values ["primary", "danger", "info", "success", "warning"] or nothing
public $enabledStyle

$height public_oe property

the height of the toggle button
public $height

$onChange public_oe property

the javascript function The function signature is function($el, status, e)
  • $el the toggle element changed.
  • status the status of the element (true=on | false=off)
  • e the event object
Example:
 array(
    class'=>'WhToggleColumn',
    'onChange'=>'js:function($el, status, e){ console.log($el, status, e); }',
 ),
public $onChange

$tagName public_oe property

the tag name. Defaults to 'div'.
public $tagName

$transitionSpeed public_oe property

the transition speed (toggle movement)
public $transitionSpeed

$width public_oe property

the width of the toggle button
public $width