PHP 클래스 WhEditableSaver

Helps to update model by editable widget submit request.
저자: Antonio Ramirez ([email protected])
저자: Vitaliy Potapov ([email protected])
상속: extends CComponent
파일 보기 프로젝트 열기: 2amigos/yiiwheels

공개 프로퍼티들

프로퍼티 타입 설명
$attribute mixed name of attribute to be updated
$errorHttpCode http status code returned in case of error
$model CActiveRecord model instance
$modelClass mixed name of model
$primaryKey mixed primaryKey value
$scenario mixed scenario used in model for update. Can be taken from scenario POST param
$value new value of attribute

보호된 프로퍼티들

프로퍼티 타입 설명
$changedAttributes mixed name of changed attributes. Used when saving model

공개 메소드들

메소드 설명
__construct ( $modelClass ) : EditableBackend Constructor
checkErrors ( ) errors as CHttpException
error ( $msg ) errors as CHttpException
onAfterUpdate ( CEvent $event ) This event is raised after the update is performed.
onBeforeUpdate ( CModelEvent $event ) This event is raised before the update is performed.
setAttribute ( mixed $name, mixed $value ) setting new value of attribute.
update ( ) main function called to update column in database

보호된 메소드들

메소드 설명
afterUpdate ( ) afterUpdate
beforeUpdate ( ) beforeUpdate

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( $modelClass ) : EditableBackend
리턴 EditableBackend

afterUpdate() 보호된 메소드

afterUpdate
protected afterUpdate ( )

beforeUpdate() 보호된 메소드

beforeUpdate
protected beforeUpdate ( )

checkErrors() 공개 메소드

errors as CHttpException
public checkErrors ( )

error() 공개 메소드

errors as CHttpException
public error ( $msg )
$msg

onAfterUpdate() 공개 메소드

This event is raised after the update is performed.
public onAfterUpdate ( CEvent $event )
$event CEvent the event parameter

onBeforeUpdate() 공개 메소드

This event is raised before the update is performed.
public onBeforeUpdate ( CModelEvent $event )
$event CModelEvent the event parameter

setAttribute() 공개 메소드

Attrubute name also stored in array to save only changed attributes
public setAttribute ( mixed $name, mixed $value )
$name mixed
$value mixed

update() 공개 메소드

main function called to update column in database
public update ( )

프로퍼티 상세

$attribute 공개적으로 프로퍼티

name of attribute to be updated
public mixed $attribute
리턴 mixed

$changedAttributes 보호되어 있는 프로퍼티

name of changed attributes. Used when saving model
protected mixed $changedAttributes
리턴 mixed

$errorHttpCode 공개적으로 프로퍼티

http status code returned in case of error
public $errorHttpCode

$model 공개적으로 프로퍼티

model instance
public CActiveRecord $model
리턴 CActiveRecord

$modelClass 공개적으로 프로퍼티

name of model
public mixed $modelClass
리턴 mixed

$primaryKey 공개적으로 프로퍼티

primaryKey value
public mixed $primaryKey
리턴 mixed

$scenario 공개적으로 프로퍼티

scenario used in model for update. Can be taken from scenario POST param
public mixed $scenario
리턴 mixed

$value 공개적으로 프로퍼티

new value of attribute
public $value