PHP Класс dosamigos\fileupload\actions\AbstractUploadAction

OVERRIDE its "upload" function to implement your own.
Автор: Antonio Ramirez ([email protected])
Наследование: extends yii\base\Action
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$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