PHP Class PKPFileUploadWizardHandler, pkp-lib

Inheritance: extends Handler
Afficher le fichier Open project: pkp/pkp-lib Class Usage Examples

Méthodes publiques

Свойство Type Description
$_assocId integer
$_assocType integer
$_fileStage integer
$_reviewRound integer
$_revisedFileId integer
$_revisionOnly boolean
$_uploaderGroupIds array
$_uploaderRoles array

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
_attachEntities ( $submissionFile ) Attach any dependent entities to a new file upload.

Method Details

__construct() public méthode

Constructor
public __construct ( )

_attachEntities() protected méthode

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

_checkForRevision() public méthode

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.
Résultat integer the if of the possibly revised file or null if no matches were found.

_getMetadataForm() public méthode

Retrieve the requested meta-data form.
public _getMetadataForm ( $request ) : SubmissionFilesMetadataForm
$request Request
Résultat SubmissionFilesMetadataForm

_getUploadedFileInfo() public méthode

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

_onlyNumbersDiffer() public méthode

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 méthode

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

confirmRevision() public méthode

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

displayFileUploadForm() public méthode

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

editMetadata() public méthode

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

finishFileSubmission() public méthode

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

getAssocId() public méthode

Get the assoc id (if any)
public getAssocId ( ) : integer
Résultat integer

getAssocType() public méthode

Get the assoc type (if any)
public getAssocType ( ) : integer
Résultat integer

getFileStage() public méthode

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

getReviewRound() public méthode

Get review round object.
public getReviewRound ( ) : ReviewRound
Résultat ReviewRound

getRevisedFileId() public méthode

Get the id of the file to be revised (if any).
public getRevisedFileId ( ) : integer
Résultat integer

getRevisionOnly() public méthode

Does this uploader only allow revisions and no new files?
public getRevisionOnly ( ) : boolean
Résultat boolean

getStageId() public méthode

Get the authorized workflow stage.
public getStageId ( ) : integer
Résultat integer One of the WORKFLOW_STAGE_ID_* constants.

getSubmission() public méthode

The submission to which we upload files.
public getSubmission ( ) : Submission
Résultat Submission

getUploaderGroupIds() public méthode

Get the uploader group IDs.
public getUploaderGroupIds ( ) : array
Résultat array

getUploaderRoles() public méthode

Get the uploader roles.
public getUploaderRoles ( ) : array
Résultat array

initialize() public méthode

public initialize ( $request, $args )

startWizard() public méthode

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

uploadFile() public méthode

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

Property Details

$_assocId public_oe property

public int $_assocId
Résultat integer

$_assocType public_oe property

public int $_assocType
Résultat integer

$_fileStage public_oe property

public int $_fileStage
Résultat integer

$_reviewRound public_oe property

public int $_reviewRound
Résultat integer

$_revisedFileId public_oe property

public int $_revisedFileId
Résultat integer

$_revisionOnly public_oe property

public bool $_revisionOnly
Résultat boolean

$_uploaderGroupIds public_oe property

public array $_uploaderGroupIds
Résultat array

$_uploaderRoles public_oe property

public array $_uploaderRoles
Résultat array