YiiWheels
  • Package
  • Class
  • Tree

Packages

  • yiiwheels
    • behaviors
    • widgets
    • widgets
      • ace
      • box
      • datepicker
      • daterangepicker
      • datetimepicker
      • detail
      • editable
      • fileupload
      • fileuploader
      • formhelpers
      • gallery
      • google
      • grid
        • behaviors
        • operations
      • highcharts
      • maskInput
      • maskmoney
      • modal
      • multiselect
      • rangeslider
      • redactor
      • select2
      • sparklines
      • switch
      • timeago
      • timepicker
      • toggle
      • typeahead

Classes

  • WhToggleAction
  • WhToggleButton
  • WhToggleColumn

Class WhToggleButton

CInputWidget
Extended by WhToggleButton
Package: YiiWheels\widgets\toggle
Copyright: Copyright © 2amigos.us 2013-
License: New BSD License
Author: Antonio Ramirez <amigo.cobos@gmail.com>
Located at widgets/toggle/WhToggleButton.php

Methods summary

public
# init( )

Widget's initialization method

Widget's initialization method

public
# run( )

Widget's run function

Widget's run function

public
# renderField( )

Renders the input field

Renders the input field

protected
# registerClientScript( )

Registers client scripts

Registers client scripts

protected array
# getConfiguration( )

Returns

array
the configuration of the plugin

Magic methods summary

Properties summary

public string $onChange
#

the javascript function

The function signature is <span class="php-keyword1">function</span>(<span class="php-var">$el</span>, status, e)
  • <span class="php-var">$el</span> 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); }',
 ),

the javascript function

The function signature is <span class="php-keyword1">function</span>(<span class="php-var">$el</span>, status, e)
  • <span class="php-var">$el</span> 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 integer $width
#

the width of the toggle button

the width of the toggle button

public integer $height
#

the height of the toggle button

the height of the toggle button

public boolean $animated
#

whether to use animation or not

whether to use animation or not

public mixed $transitionSpeed
#

the transition speed (toggle movement)

the transition speed (toggle movement)

public string $enabledLabel
#

the label to display on the enabled side

the label to display on the enabled side

public string $disabledLabel
#

the label to display on the disabled side

the label to display on the disabled side

public string $enabledStyle
#

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

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

public string $disabledStyle
#

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

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

public array $customEnabledStyle
#

a custom style for the enabled option. Format

 ...
 'customEnabledStyle'=>array(
     'background'=>'#FF00FF',
     'gradient'=>'#D300D3',
     'color'=>'#FFFFFF'
 ),
 ...

a custom style for the enabled option. Format

 ...
 'customEnabledStyle'=>array(
     'background'=>'#FF00FF',
     'gradient'=>'#D300D3',
     'color'=>'#FFFFFF'
 ),
 ...
public array $customDisabledStyle
#

a custom style for the disabled option. Format

 ...
 'customDisabledStyle'=>array(
     'background'=>'#FF00FF',
     'gradient'=>'#D300D3',
     'color'=>'#FFFFFF'
 ),
 ...

a custom style for the disabled option. Format

 ...
 'customDisabledStyle'=>array(
     'background'=>'#FF00FF',
     'gradient'=>'#D300D3',
     'color'=>'#FFFFFF'
 ),
 ...
public string $tagName
#

the tag name. Defaults to 'div'.

the tag name. Defaults to 'div'.

YiiWheels API documentation generated by ApiGen 2.8.0