PHP Класс PKPFileUploadWizardHandler, pkp-lib

Наследование: extends Handler
Показать файл Открыть проект Примеры использования класса

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

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