PHP 클래스 dosamigos\fileupload\actions\AbstractUploadAction

OVERRIDE its "upload" function to implement your own.
저자: Antonio Ramirez ([email protected])
상속: extends yii\base\Action
파일 보기 프로젝트 열기: 2amigos/yii2-file-upload-widget

공개 프로퍼티들

프로퍼티 타입 설명
$className the AR class name that we need to link the uploaded instance to
$deleteIdParamName the parameter name to pass to the delete Url route
$deleteUrlRoute the parameter name so to add the delete
$fileAttributeName the attribute name of the class that validates the uploaded files
$filePathAlias the path alias where to upload the files. -ie @frontend/web/files
$filesWebUrl the web url where they are stored. -ie http://myexample.com/files
$ownerIdParamName the parameter name where we can get the owner id. Defaults to 'ownerId'
$ownerLinkTable the owner table link -ie city_picture_assn
$ownerLinkTableAttribute the name of the attribute of the class we are going to upload and link -ie picture_id
$ownerLinkTableOwnerAttribute the owner's attribute in the table link -ie city_id
$thumbnailUrlAttributeName the attribute name of the class that will contain thumbnail's web url reference -ie thumbnail. Could also be url but then make sure the resize is correct.
$uploadAttributeName the attribute name the class is using to upload files
$urlAttributeName the attribute name of the class that will contain the web url reference -ie url

공개 메소드들

메소드 설명
init ( )
run ( ) : array

보호된 메소드들

메소드 설명
getModelErrors ( Model $model ) : array Helper function
link ( mixed $ownerId, mixed $id ) Links uploaded file to its owner.
upload ( ActiveRecord $model ) : mixed Handles files upload Override as needed.

메소드 상세

getModelErrors() 보호된 메소드

Helper function
protected getModelErrors ( Model $model ) : array
$model yii\base\Model
리턴 array

init() 공개 메소드

public init ( )

run() 공개 메소드

public run ( ) : array
리턴 array

upload() 보호된 메소드

Handles files upload Override as needed.
protected upload ( ActiveRecord $model ) : mixed
$model yii\db\ActiveRecord
리턴 mixed

프로퍼티 상세

$className 공개적으로 프로퍼티

the AR class name that we need to link the uploaded instance to
public $className

$deleteIdParamName 공개적으로 프로퍼티

the parameter name to pass to the delete Url route
public $deleteIdParamName

$deleteUrlRoute 공개적으로 프로퍼티

the parameter name so to add the delete
public $deleteUrlRoute

$fileAttributeName 공개적으로 프로퍼티

the attribute name of the class that validates the uploaded files
public $fileAttributeName

$filePathAlias 공개적으로 프로퍼티

the path alias where to upload the files. -ie @frontend/web/files
public $filePathAlias

$filesWebUrl 공개적으로 프로퍼티

the web url where they are stored. -ie http://myexample.com/files
public $filesWebUrl

$ownerIdParamName 공개적으로 프로퍼티

the parameter name where we can get the owner id. Defaults to 'ownerId'
public $ownerIdParamName

$ownerLinkTable 공개적으로 프로퍼티

the owner table link -ie city_picture_assn
public $ownerLinkTable

$ownerLinkTableAttribute 공개적으로 프로퍼티

the name of the attribute of the class we are going to upload and link -ie picture_id
public $ownerLinkTableAttribute

$ownerLinkTableOwnerAttribute 공개적으로 프로퍼티

the owner's attribute in the table link -ie city_id
public $ownerLinkTableOwnerAttribute

$thumbnailUrlAttributeName 공개적으로 프로퍼티

the attribute name of the class that will contain thumbnail's web url reference -ie thumbnail. Could also be url but then make sure the resize is correct.
public $thumbnailUrlAttributeName

$uploadAttributeName 공개적으로 프로퍼티

the attribute name the class is using to upload files
public $uploadAttributeName

$urlAttributeName 공개적으로 프로퍼티

the attribute name of the class that will contain the web url reference -ie url
public $urlAttributeName