\TbEditableSaver

EditableSaver helps to update model by editable widget submit request.

Summary

Methods
Properties
Constants
update()
error()
setAttribute()
onBeforeUpdate()
onAfterUpdate()
$scenario
$modelClass
$primaryKey
$attribute
$model
$value
$errorHttpCode
No constants found
beforeUpdate()
afterUpdate()
$changedAttributes
N/A
No private methods found
No private properties found
N/A

Properties

$scenario

$scenario : mixed

scenarion used in model for update

Type

mixed

$modelClass

$modelClass : mixed

name of model

Type

mixed

$primaryKey

$primaryKey : mixed

primaryKey value

Type

mixed

$attribute

$attribute : mixed

name of attribute to be updated

Type

mixed

$model

$model : \CActiveRecord

model instance

Type

\CActiveRecord

$value

$value : mixed

Type

mixed — new value of attribute

$errorHttpCode

$errorHttpCode

http status code returned in case of error

$changedAttributes

$changedAttributes : mixed

name of changed attributes. Used when saving model

Type

mixed

Methods

update()

update()

### .update()

main function called to update column in database

error()

error(mixed $msg)

### .error()

errors as CHttpException

Parameters

mixed $msg

Throws

\CHttpException

setAttribute()

setAttribute(mixed $name, mixed $value)

### .setAttribute()

setting new value of attribute. Attrubute name also stored in array to save only changed attributes

Parameters

mixed $name
mixed $value

onBeforeUpdate()

onBeforeUpdate(\CModelEvent $event)

### .onBeforeUpdate()

This event is raised before the update is performed.

Parameters

\CModelEvent $event

the event parameter

onAfterUpdate()

onAfterUpdate(\CModelEvent $event)

### .onAfterUpdate()

This event is raised after the update is performed.

Parameters

\CModelEvent $event

the event parameter

beforeUpdate()

beforeUpdate()

### .beforeUpdate()

beforeUpdate

afterUpdate()

afterUpdate()

### .afterUpdate()

afterUpdate