YiiWheels
  • Package
  • Class
  • Tree

Packages

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

Classes

  • WhToggleAction
  • WhToggleColumn

Class WhToggleAction

WhToggleAction action class

Works in conjunction with WhToggleColumn widget in order to ease the task of the developer to update the the attribute displayed on the grid. Just attach to the controller you wish to make the calls to.

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

Methods summary

public
# run( integer $id, string $attribute )

Widgets run function

Widgets run function

Parameters

$id
integer
$id
$attribute
string
$attribute

Throws

CHttpException
protected CActiveRecord
# loadModel( integer $id )

Loads the requested data model.

Loads the requested data model.

Parameters

$id
integer
$id the model ID

Returns

CActiveRecord
the model instance.

Throws

CHttpException
if the model cannot be found

Magic methods summary

Properties summary

public string $modelName
#

the name of the model we are going to toggle values to

the name of the model we are going to toggle values to

public boolean $exceptionOnNullModel
#

whether to throw an exception if we cannot find a model requested by the id

whether to throw an exception if we cannot find a model requested by the id

public array $additionalCriteriaOnLoadModel
#

additional criteria to use to get the model

additional criteria to use to get the model

public mixed $redirectRoute
#

the route to redirect the call after updating attribute

the route to redirect the call after updating attribute

public integer|string $yesValue
#

the value to update the model to [yes|no] standard toggle options, but you can toggle any value.

the value to update the model to [yes|no] standard toggle options, but you can toggle any value.

public integer|string $noValue
#

the value to update the model to [yes|no]

the value to update the model to [yes|no]

public mixed $ajaxResponseOnSuccess
#

the response to return to an AJAX call when the attribute was successfully saved.

the response to return to an AJAX call when the attribute was successfully saved.

public mixed $ajaxResponseOnFailed
#

the response to return to an AJAX call when failed to update the attribute.

the response to return to an AJAX call when failed to update the attribute.

YiiWheels API documentation generated by ApiGen 2.8.0