HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
TbEditableSaver Class Reference

Public Member Functions

 __construct ($modelClass)
 update ()
 checkErrors ()
 error ($msg)
 setAttribute ($name, $value)
 onBeforeUpdate ($event)
 onAfterUpdate ($event)

Public Attributes

 $scenario = 'editable'
 $modelClass
 $primaryKey
 $attribute
 $model
 $value
 $errorHttpCode = 400

Protected Member Functions

 beforeUpdate ()
 afterUpdate ()

Protected Attributes

 $changedAttributes = array()

Detailed Description

Definition at line 16 of file TbEditableSaver.php.

Constructor & Destructor Documentation

TbEditableSaver::__construct (   $modelClass)

._construct()

Constructor

Parameters
$modelClass
Exceptions
CException

Definition at line 78 of file TbEditableSaver.php.

Member Function Documentation

TbEditableSaver::afterUpdate ( )
protected

.afterUpdate()

afterUpdate

Definition at line 268 of file TbEditableSaver.php.

Here is the call graph for this function:

Here is the caller graph for this function:

TbEditableSaver::beforeUpdate ( )
protected

.beforeUpdate()

beforeUpdate

Definition at line 257 of file TbEditableSaver.php.

Here is the call graph for this function:

Here is the caller graph for this function:

TbEditableSaver::checkErrors ( )

.checkErros()

errors as CHttpException

Definition at line 182 of file TbEditableSaver.php.

Here is the call graph for this function:

Here is the caller graph for this function:

TbEditableSaver::error (   $msg)

.error()

errors as CHttpException

Parameters
$msg
Exceptions
CHttpException

Definition at line 205 of file TbEditableSaver.php.

Here is the caller graph for this function:

TbEditableSaver::onAfterUpdate (   $event)

.onAfterUpdate()

This event is raised after the update is performed.

Parameters
CModelEvent$eventthe event parameter

Definition at line 246 of file TbEditableSaver.php.

Here is the caller graph for this function:

TbEditableSaver::onBeforeUpdate (   $event)

.onBeforeUpdate()

This event is raised before the update is performed.

Parameters
CModelEvent$eventthe event parameter

Definition at line 234 of file TbEditableSaver.php.

Here is the caller graph for this function:

TbEditableSaver::setAttribute (   $name,
  $value 
)

.setAttribute()

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

Parameters
mixed$name
mixed$value

Definition at line 219 of file TbEditableSaver.php.

Here is the caller graph for this function:

TbEditableSaver::update ( )

.update()

main function called to update column in database

Definition at line 102 of file TbEditableSaver.php.

Here is the call graph for this function:

Member Data Documentation

TbEditableSaver::$attribute

Definition at line 42 of file TbEditableSaver.php.

TbEditableSaver::$changedAttributes = array()
protected

Definition at line 65 of file TbEditableSaver.php.

TbEditableSaver::$errorHttpCode = 400

http status code returned in case of error

Definition at line 58 of file TbEditableSaver.php.

TbEditableSaver::$model

Definition at line 48 of file TbEditableSaver.php.

TbEditableSaver::$modelClass

Definition at line 30 of file TbEditableSaver.php.

TbEditableSaver::$primaryKey

Definition at line 36 of file TbEditableSaver.php.

TbEditableSaver::$scenario = 'editable'

Definition at line 23 of file TbEditableSaver.php.

TbEditableSaver::$value

Definition at line 53 of file TbEditableSaver.php.


The documentation for this class was generated from the following file: