PHP Класс WhToggleButton

Автор: Antonio Ramirez ([email protected])
Наследование: extends CInputWidget
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$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

Открытые методы

Метод Описание
init ( ) Widget's initialization method
renderField ( ) Renders the input field
run ( ) Widget's run function

Защищенные методы

Метод Описание
getConfiguration ( ) : array
registerClientScript ( ) Registers client scripts

Описание методов

getConfiguration() защищенный Метод

protected getConfiguration ( ) : array
Результат array the configuration of the plugin

init() публичный Метод

Widget's initialization method
public init ( )

registerClientScript() защищенный Метод

Registers client scripts
protected registerClientScript ( )

renderField() публичный Метод

Renders the input field
public renderField ( )

run() публичный Метод

Widget's run function
public run ( )

Описание свойств

$animated публичное свойство

whether to use animation or not
public $animated

$customDisabledStyle публичное свойство

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

$customEnabledStyle публичное свойство

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

$disabledLabel публичное свойство

the label to display on the disabled side
public $disabledLabel

$disabledStyle публичное свойство

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

$enabledLabel публичное свойство

the label to display on the enabled side
public $enabledLabel

$enabledStyle публичное свойство

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

$height публичное свойство

the height of the toggle button
public $height

$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); }',
 ),
public $onChange

$tagName публичное свойство

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

$transitionSpeed публичное свойство

the transition speed (toggle movement)
public $transitionSpeed

$width публичное свойство

the width of the toggle button
public $width