PHP Класс TbToggleAction

It is a component that works in conjunction of TbToggleColumn widget. Just attach to the controller you wish to make the calls to.
Наследование: extends CAction
Показать файл Открыть проект

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

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