PHP 클래스 PKPFileUploadWizardHandler, pkp-lib

상속: extends Handler
파일 보기 프로젝트 열기: pkp/pkp-lib 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$_assocId integer
$_assocType integer
$_fileStage integer
$_reviewRound integer
$_revisedFileId integer
$_revisionOnly boolean
$_uploaderGroupIds array
$_uploaderRoles array

공개 메소드들

메소드 설명
__construct ( ) Constructor
_checkForRevision ( &$uploadedFile, &$submissionFiles ) : integer Check if the uploaded file has a similar name to an existing file which would then be a candidate for a revised file.
_getMetadataForm ( $request ) : SubmissionFilesMetadataForm Retrieve the requested meta-data form.
_getUploadedFileInfo ( SubmissionFile $uploadedFile ) : array Create an array that describes an uploaded file which can be used in a JSON response.
_onlyNumbersDiffer ( $a, $b ) Helper function: check if the only difference between $a and $b is numeric. Used to exclude well-named but nearly identical file names from the revision detection pile (e.g. "Chapter 1" and "Chapter 2")
authorize ( $request, &$args, $roleAssignments )
confirmRevision ( $args, $request ) : JSONMessage Confirm that the uploaded file is a revision of an earlier uploaded file.
displayFileUploadForm ( $args, $request ) : JSONMessage Render the file upload form in its initial state.
editMetadata ( $args, $request ) : JSONMessage Edit the metadata of the latest revision of the requested submission file.
finishFileSubmission ( $args, $request ) : JSONMessage Display the final tab of the modal
getAssocId ( ) : integer Get the assoc id (if any)
getAssocType ( ) : integer Get the assoc type (if any)
getFileStage ( ) : integer Get the workflow stage file storage that we upload files to. One of the SUBMISSION_FILE_* constants.
getReviewRound ( ) : ReviewRound Get review round object.
getRevisedFileId ( ) : integer Get the id of the file to be revised (if any).
getRevisionOnly ( ) : boolean Does this uploader only allow revisions and no new files?
getStageId ( ) : integer Get the authorized workflow stage.
getSubmission ( ) : Submission The submission to which we upload files.
getUploaderGroupIds ( ) : array Get the uploader group IDs.
getUploaderRoles ( ) : array Get the uploader roles.
initialize ( $request, $args )
startWizard ( $args, $request ) : JSONMessage Displays the file upload wizard.
uploadFile ( $args, $request ) : JSONMessage Upload a file and render the modified upload wizard.

보호된 메소드들

메소드 설명
_attachEntities ( $submissionFile ) Attach any dependent entities to a new file upload.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( )

_attachEntities() 보호된 메소드

Attach any dependent entities to a new file upload.
protected _attachEntities ( $submissionFile )
$submissionFile SubmissionFile

_checkForRevision() 공개 메소드

Check if the uploaded file has a similar name to an existing file which would then be a candidate for a revised file.
public _checkForRevision ( &$uploadedFile, &$submissionFiles ) : integer
$uploadedFile SubmissionFile
$submissionFiles array a list of submission files to check the uploaded file against.
리턴 integer the if of the possibly revised file or null if no matches were found.

_getMetadataForm() 공개 메소드

Retrieve the requested meta-data form.
public _getMetadataForm ( $request ) : SubmissionFilesMetadataForm
$request Request
리턴 SubmissionFilesMetadataForm

_getUploadedFileInfo() 공개 메소드

Create an array that describes an uploaded file which can be used in a JSON response.
public _getUploadedFileInfo ( SubmissionFile $uploadedFile ) : array
$uploadedFile SubmissionFile
리턴 array

_onlyNumbersDiffer() 공개 메소드

Helper function: check if the only difference between $a and $b is numeric. Used to exclude well-named but nearly identical file names from the revision detection pile (e.g. "Chapter 1" and "Chapter 2")
public _onlyNumbersDiffer ( $a, $b )
$a string
$b string

authorize() 공개 메소드

public authorize ( $request, &$args, $roleAssignments )

confirmRevision() 공개 메소드

Confirm that the uploaded file is a revision of an earlier uploaded file.
public confirmRevision ( $args, $request ) : JSONMessage
$args array
$request Request
리턴 JSONMessage JSON object

displayFileUploadForm() 공개 메소드

Render the file upload form in its initial state.
public displayFileUploadForm ( $args, $request ) : JSONMessage
$args array
$request Request
리턴 JSONMessage JSON object

editMetadata() 공개 메소드

Edit the metadata of the latest revision of the requested submission file.
public editMetadata ( $args, $request ) : JSONMessage
$args array
$request Request
리턴 JSONMessage JSON object

finishFileSubmission() 공개 메소드

Display the final tab of the modal
public finishFileSubmission ( $args, $request ) : JSONMessage
$args array
$request Request
리턴 JSONMessage JSON object

getAssocId() 공개 메소드

Get the assoc id (if any)
public getAssocId ( ) : integer
리턴 integer

getAssocType() 공개 메소드

Get the assoc type (if any)
public getAssocType ( ) : integer
리턴 integer

getFileStage() 공개 메소드

Get the workflow stage file storage that we upload files to. One of the SUBMISSION_FILE_* constants.
public getFileStage ( ) : integer
리턴 integer

getReviewRound() 공개 메소드

Get review round object.
public getReviewRound ( ) : ReviewRound
리턴 ReviewRound

getRevisedFileId() 공개 메소드

Get the id of the file to be revised (if any).
public getRevisedFileId ( ) : integer
리턴 integer

getRevisionOnly() 공개 메소드

Does this uploader only allow revisions and no new files?
public getRevisionOnly ( ) : boolean
리턴 boolean

getStageId() 공개 메소드

Get the authorized workflow stage.
public getStageId ( ) : integer
리턴 integer One of the WORKFLOW_STAGE_ID_* constants.

getSubmission() 공개 메소드

The submission to which we upload files.
public getSubmission ( ) : Submission
리턴 Submission

getUploaderGroupIds() 공개 메소드

Get the uploader group IDs.
public getUploaderGroupIds ( ) : array
리턴 array

getUploaderRoles() 공개 메소드

Get the uploader roles.
public getUploaderRoles ( ) : array
리턴 array

initialize() 공개 메소드

public initialize ( $request, $args )

startWizard() 공개 메소드

Displays the file upload wizard.
public startWizard ( $args, $request ) : JSONMessage
$args array
$request Request
리턴 JSONMessage JSON object

uploadFile() 공개 메소드

Upload a file and render the modified upload wizard.
public uploadFile ( $args, $request ) : JSONMessage
$args array
$request Request
리턴 JSONMessage JSON object

프로퍼티 상세

$_assocId 공개적으로 프로퍼티

public int $_assocId
리턴 integer

$_assocType 공개적으로 프로퍼티

public int $_assocType
리턴 integer

$_fileStage 공개적으로 프로퍼티

public int $_fileStage
리턴 integer

$_reviewRound 공개적으로 프로퍼티

public int $_reviewRound
리턴 integer

$_revisedFileId 공개적으로 프로퍼티

public int $_revisedFileId
리턴 integer

$_revisionOnly 공개적으로 프로퍼티

public bool $_revisionOnly
리턴 boolean

$_uploaderGroupIds 공개적으로 프로퍼티

public array $_uploaderGroupIds
리턴 array

$_uploaderRoles 공개적으로 프로퍼티

public array $_uploaderRoles
리턴 array