Class P3FileUploadBehavior
Behavior, handles file uploads
Note: This behavior currently requires a set of fixed attribute names within the model (path, mimeType, title, size, originalName, md5).
- CComponent
-
CBehavior implements IBehavior
-
CModelBehavior
-
CActiveRecordBehavior
-
P3FileUploadBehavior
Copyright: Copyright © 2005-2010 diemeisterei GmbH
License: http://www.phundament.com/license/
Author: Tobias Munk <schmunk@usrbin.de>
Since: 3.0.1
Located at phundament/p3extensions/behaviors/P3FileUploadBehavior.php
Methods summary
public
|
#
afterValidate( type $event )
Stores file in appropriate directory and updates owner record with info about the file. |
public
|
#
beforeDelete( CEvent $event )
Responds to CActiveRecord::onBeforeDelete 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 deletion process. |
public
|
#
afterDelete( CEvent $event )
Responds to CActiveRecord::onAfterDelete event. Overrides this method if you want to handle the corresponding event of the CBehavior::owner owner. |
Methods inherited from CActiveRecordBehavior
afterFind()
,
afterSave()
,
beforeFind()
,
beforeSave()
,
events()
Methods inherited from CModelBehavior
afterConstruct()
,
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()
Magic methods summary
Constants summary
string |
TRASH_FOLDER
|
'trash' |
Properties summary
public
mixed
|
$uploadInstance | |
public
type
|
$dataAlias |
#
Yii path alias, where to store files |
public
type
|
$dataSubdirectory |
#
Subdirectory for uploaded files (e.g. user directories) |
public
type
|
$trashAlias |
#
Yii path alias, where to move delted files |
Magic properties inherited from CActiveRecordBehavior
$owner
Magic properties inherited from CBehavior
$enabled