Class AssociatedMediaBehavior
Manages file upload for filename fields. If file fails to be saved,
save/update will be cancelled.
-
CComponent
-
CBehavior
implements
IBehavior
-
CModelBehavior
-
CActiveRecordBehavior
-
X2ActiveRecordBehavior
-
AssociatedMediaBehavior
Methods summary
public
|
|
public
array
|
#
events( )
Declares events and the corresponding event handler methods. If you override
this method, make sure you merge the parent result to the return value.
Declares events and the corresponding event handler methods. If you override
this method, make sure you merge the parent result to the return value.
Returns
array events (array keys) and the corresponding event handler methods (array values).
See
CBehavior::events
Overrides
CActiveRecordBehavior::events()
|
public
|
#
saveAssociatedMedia( mixed $file )
Save uploaded file and add associated media object
Save uploaded file and add associated media object
|
public
|
#
afterSave( CEvent $evt )
Responds to CActiveRecord::onAfterSave event. Override this method
and make it public if you want to handle the corresponding event of the CBehavior::owner owner.
Responds to CActiveRecord::onAfterSave event. Override this method
and make it public if you want to handle the corresponding event of the CBehavior::owner owner.
Parameters
- $evt
CEvent $event event parameter
Overrides
CActiveRecordBehavior::afterSave()
|
Methods inherited from CActiveRecordBehavior
afterDelete(),
afterFind(),
beforeCount(),
beforeDelete(),
beforeFind(),
beforeSave()
|
Methods inherited from CModelBehavior
afterConstruct(),
afterValidate(),
beforeValidate()
|
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()
|
Constants summary
integer |
IMAGE
|
1 |
|
Magic properties inherited from CActiveRecordBehavior
$owner
|
Magic properties inherited from CBehavior
$enabled
|