Class X2ChangeLogBehavior
Changelog recording behavior class.
X2ChangeLogBehavior is a CActiveRecordBehavior which automatically saves changelog data when a record is saved. It also looks up any applicable notification criteria and takes the appropriate action (create a notification, create a new action, reassign the record, etc.)
- CComponent
- CBehavior implements IBehavior
- CModelBehavior
- CActiveRecordBehavior
- X2ChangeLogBehavior
public
array
|
|
public
type
|
#
getEditingUsername( )
Magic getter for editingUsername that returns a username regardless of context. |
public static
|
|
public
|
#
beforeSave( CModelEvent $event )
Responds to CActiveRecord::onBeforeSave event. Override this method and make it public if you want to handle the corresponding event of the CBehavior::owner owner. You may set CModelEvent::isValid to be false to quit the saving process. |
public
|
|
public
|
#
afterValidate( CEvent $event )
Marks the record as validated, so we know somebody called CActiveRecord::save() rather than CActiveRecord::update() on it |
public
|
#
afterUpdate( mixed $event )
Triggers record_updated, runs changelog calculations and checks notification criteria (soon to be removed) |
public
|
|
public
array
|
|
public
|
#
updateChangelog( array $changes = null )
Writes field changes to the changelog. Calls |
public
|
#
checkNotificationCriteria( string $fieldName, string $old, string $new )
Looks up notification criteria in x2_criteria relevant to this model and field and performs the specified operation. Soon to be eliminated in wake of x2flow automation system. |
afterFind(),
afterSave(),
beforeCount(),
beforeDelete(),
beforeFind()
|
afterConstruct(),
beforeValidate()
|
attach(),
detach(),
getEnabled(),
getOwner(),
setEnabled()
|
__call(),
__get(),
__isset(),
__set(),
__unset(),
asa(),
attachBehavior(),
attachBehaviors(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
detachBehavior(),
detachBehaviors(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
getEventHandlers(),
hasEvent(),
hasEventHandler(),
hasProperty(),
raiseEvent()
|
public
boolean
|
$createEvent | true |
|
protected
boolean
|
$validated | false |
public
string
|
$autoCompleteSource |
#
The action to user for autocomplete data |
public
string
|
$baseRoute |
#
The default module/controller this model "belongs" to |
public
string
|
$editingUsername |
#
Username of the user who is performing the save operation. |
public
string
|
$viewRoute |
#
The default action to view this model |
$owner
|
$enabled
|