PHP 클래스 dosamigos\fileupload\actions\FileDeleteAction

저자: Antonio Ramirez ([email protected])
상속: extends yii\base\Action
파일 보기 프로젝트 열기: 2amigos/yii2-file-upload-widget

공개 프로퍼티들

프로퍼티 타입 설명
$className the AR class name that we need to delete
$idParamName the parameter name in the request. Defaults to 'id'.
$ownerLinkTable the name of the table handling relations -ie city_picture_assn
$ownerLinkTableAttribute the name of the attribute of the class we are going to delete -ie picture_id
$redirectRoute the route to redirect after successful deletion. Note: If the user is doing and AJAX'ed request. Will simply return a JSON with success true or false. If success it will contain a message, otherwise will contain also errors key so you can display the issues on a notification plugin or whatever.

공개 메소드들

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

보호된 메소드들

메소드 설명
getModelErrors ( Model $model ) : array Helper function
unlink ( mixed $id ) Removed

메소드 상세

getModelErrors() 보호된 메소드

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

init() 공개 메소드

public init ( )

run() 공개 메소드

public run ( ) : array | Response
리턴 array | yii\web\Response

프로퍼티 상세

$className 공개적으로 프로퍼티

the AR class name that we need to delete
public $className

$idParamName 공개적으로 프로퍼티

the parameter name in the request. Defaults to 'id'.
public $idParamName

$ownerLinkTable 공개적으로 프로퍼티

the name of the table handling relations -ie city_picture_assn
public $ownerLinkTable

$ownerLinkTableAttribute 공개적으로 프로퍼티

the name of the attribute of the class we are going to delete -ie picture_id
public $ownerLinkTableAttribute

$redirectRoute 공개적으로 프로퍼티

the route to redirect after successful deletion. Note: If the user is doing and AJAX'ed request. Will simply return a JSON with success true or false. If success it will contain a message, otherwise will contain also errors key so you can display the issues on a notification plugin or whatever.
public $redirectRoute