PHP 클래스 TbToggleButton

상속: extends CInputWidget
파일 보기 프로젝트 열기: yinhe/yincart

공개 프로퍼티들

프로퍼티 타입 설명
$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
$form when created via TbActiveForm, this attribute is set to the form that renders the widget
$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'=>'TbToggleColumn',
    'onChange'=>'js:function($el, status, e){ console.log($el, status, e); }',
 ),
$transitionSpeed the transition speed (toggle movement)
$width the width of the toggle button

공개 메소드들

메소드 설명
run ( ) Widget's run function

보호된 메소드들

메소드 설명
getConfiguration ( ) : array
registerClientScript ( integer $id ) Registers required css and js files

메소드 상세

getConfiguration() 보호된 메소드

protected getConfiguration ( ) : array
리턴 array the configuration of the plugin

registerClientScript() 보호된 메소드

Registers required css and js files
protected registerClientScript ( integer $id )
$id integer the id of the toggle button

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

$form 공개적으로 프로퍼티

when created via TbActiveForm, this attribute is set to the form that renders the widget
public $form

$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'=>'TbToggleColumn',
    'onChange'=>'js:function($el, status, e){ console.log($el, status, e); }',
 ),
public $onChange

$transitionSpeed 공개적으로 프로퍼티

the transition speed (toggle movement)
public $transitionSpeed

$width 공개적으로 프로퍼티

the width of the toggle button
public $width