PHP Class PKPManageFileApiHandler, pkp-lib

Inheritance: extends Handler
Exibir arquivo Open project: pkp/pkp-lib Class Usage Examples

Public Methods

Method Description
__construct ( ) Constructor.
authorize ( $request, &$args, $roleAssignments )
deleteFile ( $args, $request ) : JSONMessage Delete a file or revision
editMetadata ( $args, $request ) : JSONMessage Edit submission file metadata modal.
editMetadataTab ( $args, $request ) : JSONMessage Edit submission file metadata tab.
getFileManager ( $contextId, $submissionId ) : SubmissionFileManager Get the submission file manager.
logDeletionEvent ( $request, $submission, $submissionFile, $user ) Logs the deletion event using app-specific logging classes.
removeFileIndex ( $submission, $submissionFile ) Remove the submission file index.
saveMetadata ( $args, $request ) : JSONMessage Save the metadata of the latest revision of the requested submission file.

Protected Methods

Method Description
getUpdateNotifications ( ) : array Get the list of notifications to be updated on metadata form submission.

Method Details

__construct() public method

Constructor.
public __construct ( )

authorize() public method

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

deleteFile() public method

Delete a file or revision
public deleteFile ( $args, $request ) : JSONMessage
$args array
$request Request
return JSONMessage JSON object

editMetadata() public method

Edit submission file metadata modal.
public editMetadata ( $args, $request ) : JSONMessage
$args array
$request Request
return JSONMessage JSON object

editMetadataTab() public method

Edit submission file metadata tab.
public editMetadataTab ( $args, $request ) : JSONMessage
$args array
$request Request
return JSONMessage JSON object

getFileManager() public method

Get the submission file manager.
public getFileManager ( $contextId, $submissionId ) : SubmissionFileManager
$contextId int the context id.
$submissionId int the submission id.
return SubmissionFileManager

getUpdateNotifications() protected method

Get the list of notifications to be updated on metadata form submission.
protected getUpdateNotifications ( ) : array
return array

logDeletionEvent() abstract public method

Must be implemented by subclasses.
abstract public logDeletionEvent ( $request, $submission, $submissionFile, $user )
$request PKPRequest
$submission Submission
$submissionFile SubmissionFile
$user PKPUser

removeFileIndex() abstract public method

Remove the submission file index.
abstract public removeFileIndex ( $submission, $submissionFile )
$submission Submission
$submissionFile SubmissionFile

saveMetadata() public method

Save the metadata of the latest revision of the requested submission file.
public saveMetadata ( $args, $request ) : JSONMessage
$args array
$request Request
return JSONMessage JSON object