PHP 클래스 WhToggleAction

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.
저자: Antonio Ramirez ([email protected])
상속: extends CAction
파일 보기 프로젝트 열기: 2amigos/yiiwheels

공개 프로퍼티들

프로퍼티 타입 설명
$additionalCriteriaOnLoadModel additional criteria to use to get the model
$ajaxResponseOnFailed the response to return to an AJAX call when failed to update the attribute.
$ajaxResponseOnSuccess the response to return to an AJAX call when the attribute was successfully saved.
$exceptionOnNullModel whether to throw an exception if we cannot find a model requested by the id
$modelName the name of the model we are going to toggle values to
$noValue the value to update the model to [yes|no]
$redirectRoute the route to redirect the call after updating attribute
$yesValue the value to update the model to [yes|no] standard toggle options, but you can toggle any value.

공개 메소드들

메소드 설명
run ( integer $id, string $attribute ) Widgets run function

보호된 메소드들

메소드 설명
loadModel ( integer $id ) : CActiveRecord Loads the requested data model.

메소드 상세

loadModel() 보호된 메소드

Loads the requested data model.
protected loadModel ( integer $id ) : CActiveRecord
$id integer the model ID
리턴 CActiveRecord the model instance.

run() 공개 메소드

Widgets run function
public run ( integer $id, string $attribute )
$id integer
$attribute string

프로퍼티 상세

$additionalCriteriaOnLoadModel 공개적으로 프로퍼티

additional criteria to use to get the model
public $additionalCriteriaOnLoadModel

$ajaxResponseOnFailed 공개적으로 프로퍼티

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

$ajaxResponseOnSuccess 공개적으로 프로퍼티

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

$exceptionOnNullModel 공개적으로 프로퍼티

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

$modelName 공개적으로 프로퍼티

the name of the model we are going to toggle values to
public $modelName

$noValue 공개적으로 프로퍼티

the value to update the model to [yes|no]
public $noValue

$redirectRoute 공개적으로 프로퍼티

the route to redirect the call after updating attribute
public $redirectRoute

$yesValue 공개적으로 프로퍼티

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