Class OwnerBehavior
CActiveRecordBehavior is the base class for behaviors that can be attached to CActiveRecord. Compared with CModelBehavior, CActiveRecordBehavior attaches to more events that are only defined by CActiveRecord.
- CComponent
-
CBehavior implements IBehavior
-
CModelBehavior
-
CActiveRecordBehavior
-
OwnerBehavior
Author: Qiang Xue <qiang.xue@gmail.com>
Version: $Id$
Located at phundament/gii-template-collection/components/OwnerBehavior.php
Methods summary
public
|
#
beforeValidate( CModelEvent $on )
Responds to CModel::onBeforeValidate event. Overrides this method if you want to handle the corresponding event of the owner. You may set CModelEvent::isValid to be false to quit the validation process. |
public
|
#
beforeSave( CModelEvent $on )
Responds to CActiveRecord::onBeforeSave event. Overrides this method 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. |
Methods inherited from CActiveRecordBehavior
afterDelete()
,
afterFind()
,
afterSave()
,
beforeDelete()
,
beforeFind()
,
events()
Methods inherited from CModelBehavior
afterConstruct()
,
afterValidate()
Methods inherited from CBehavior
attach()
,
detach()
,
getEnabled()
,
getOwner()
,
setEnabled()
Methods inherited from CComponent
__call()
,
__get()
,
__isset()
,
__set()
,
__unset()
,
asa()
,
attachBehavior()
,
attachBehaviors()
,
attachEventHandler()
,
canGetProperty()
,
canSetProperty()
,
detachBehavior()
,
detachBehaviors()
,
detachEventHandler()
,
disableBehavior()
,
disableBehaviors()
,
enableBehavior()
,
enableBehaviors()
,
evaluateExpression()
,
getEventHandlers()
,
hasEvent()
,
hasEventHandler()
,
hasProperty()
,
raiseEvent()
Magic methods summary
Properties summary
public
string
|
$ownerColumn |
#
The field that stores the pk of the owner |
public
string
|
$lastChangeColumn |
#
The field that stores the pk of user that did the the last change |
Magic properties inherited from CActiveRecordBehavior
$owner
Magic properties inherited from CBehavior
$enabled