Open Journal Systems  3.3.0
PKPSubmissionHandler Class Reference
Inheritance diagram for PKPSubmissionHandler:
APIHandler PKPHandler SubmissionHandler

Public Member Functions

 __construct ()
 
 add ($slimRequest, $response, $args)
 
 addPublication ($slimRequest, $response, $args)
 
 authorize ($request, &$args, $roleAssignments)
 
 authorize ($request, &$args, $roleAssignments)
 
 delete ($slimRequest, $response, $args)
 
 deletePublication ($slimRequest, $response, $args)
 
 edit ($slimRequest, $response, $args)
 
 editPublication ($slimRequest, $response, $args)
 
 get ($slimRequest, $response, $args)
 
 getMany ($slimRequest, $response, $args)
 
 getParticipants ($slimRequest, $response, $args)
 
 getPublication ($slimRequest, $response, $args)
 
 getPublications ($slimRequest, $response, $args)
 
 getStepCount ()
 
 getStepsNumberAndLocaleKeys ()
 
 index ($args, $request)
 
 publishPublication ($slimRequest, $response, $args)
 
 saveStep ($args, $request)
 
 setupTemplate ($request)
 
 step ($args, $request)
 
 unpublishPublication ($slimRequest, $response, $args)
 
 versionPublication ($slimRequest, $response, $args)
 
 wizard ($args, $request)
 
- Public Member Functions inherited from APIHandler
 convertStringsToSchema ($schema, $params)
 
 getApp ()
 
 getEndpointPattern ()
 
 getEndpoints ()
 
 getEntityId ($parameterName)
 
 getParameter ($parameterName, $default=null)
 
 getRequest ()
 
 getSlimRequest ()
 
 setSlimRequest ($slimRequest)
 
 setupEndpoints ()
 
- Public Member Functions inherited from PKPHandler
 addPolicy ($authorizationPolicy, $addToTop=false)
 
 addRoleAssignment ($roleIds, $operations)
 
 getApiToken ()
 
getAuthorizedContext ()
 
getAuthorizedContextObject ($assocType)
 
getDispatcher ()
 
 getFirstUserContext ($user, $contexts)
 
 getId ()
 
 getLastAuthorizationMessage ()
 
 getRoleAssignment ($roleId)
 
 getRoleAssignments ()
 
 getSiteRedirectContext ($request)
 
 getTargetContext ($request, &$contextsCount=null)
 
 initialize ($request)
 
 markRoleAssignmentsChecked ()
 
 requireSSL ()
 
 setApiToken ($apiToken)
 
 setDispatcher ($dispatcher)
 
 setEnforceRestrictedSite ($enforceRestrictedSite)
 
 setId ($id)
 
 validate ($requiredContexts=null, $request=null)
 

Data Fields

 $_isBackendPage = true
 
- Data Fields inherited from PKPHandler
 $_authorizationDecisionManager
 
 $_checks = array()
 
 $_dispatcher
 
 $_enforceRestrictedSite = true
 
 $_id
 
 $_isBackendPage = false
 
 $_roleAssignments = array()
 
 $_roleAssignmentsChecked = false
 

Additional Inherited Members

- Static Public Member Functions inherited from PKPHandler
static getPageParamName ($rangeName)
 
static getRangeInfo ($request, $rangeName, $contextData=null)
 
static hashPageContext ($request, $contextData=array())
 
- Protected Member Functions inherited from APIHandler
 _validateStatDates ($params, $dateStartParam='dateStart', $dateEndParam='dateEnd')
 
- Protected Attributes inherited from APIHandler
 $_app
 
 $_endpoints = array()
 
 $_handlerPath = null
 
 $_pathPattern
 
 $_request
 
 $_slimRequest = null
 
- Protected Attributes inherited from PKPHandler
 $_apiToken = null
 

Detailed Description

Base handler for submission requests.

Definition at line 20 of file api/v1/submissions/PKPSubmissionHandler.inc.php.

Constructor & Destructor Documentation

◆ __construct()

PKPSubmissionHandler::__construct ( )

Constructor

Reimplemented from APIHandler.

Reimplemented in SubmissionHandler.

Definition at line 25 of file api/v1/submissions/PKPSubmissionHandler.inc.php.

References APIHandler\getEndpointPattern().

Member Function Documentation

◆ add()

PKPSubmissionHandler::add (   $slimRequest,
  $response,
  $args 
)

Add a new submission

Parameters
$slimRequestRequest Slim request object
$responseResponse object
array$argsarguments
Returns
Response

Definition at line 307 of file api/v1/submissions/PKPSubmissionHandler.inc.php.

References APIHandler\convertStringsToSchema(), PKPServices\get(), DAORegistry\getDAO(), APIHandler\getRequest(), and AppLocale\requireComponents().

◆ addPublication()

PKPSubmissionHandler::addPublication (   $slimRequest,
  $response,
  $args 
)

Add a new publication to this submission

This will create a new publication from scratch. If you want to create a new version of a publication, see self::versionPublication().

Parameters
$slimRequestRequest Slim request object
$responseResponse object
array$argsarguments
Returns
Response

Definition at line 560 of file api/v1/submissions/PKPSubmissionHandler.inc.php.

References APIHandler\convertStringsToSchema(), PKPServices\get(), PKPHandler\getAuthorizedContextObject(), DAORegistry\getDAO(), and APIHandler\getRequest().

◆ authorize() [1/2]

PKPSubmissionHandler::authorize (   $request,
$args,
  $roleAssignments 
)

Authorize this request.

Routers will call this method automatically thereby enforcing authorization. This method will be called before the validate() method and before passing control on to the handler operation.

NB: This method will be called once for every request only.

Parameters
$requestRequest
$argsarray request arguments
$roleAssignmentsarray the operation role assignment, see getRoleAssignment() for more details.
Returns
boolean

Reimplemented from PKPHandler.

Definition at line 27 of file pages/submission/PKPSubmissionHandler.inc.php.

References PKPHandler\addPolicy(), PKPHandler\getAuthorizedContextObject(), getStepCount(), and PKPHandler\markRoleAssignmentsChecked().

◆ authorize() [2/2]

PKPSubmissionHandler::authorize (   $request,
$args,
  $roleAssignments 
)

Authorize this request.

Routers will call this method automatically thereby enforcing authorization. This method will be called before the validate() method and before passing control on to the handler operation.

NB: This method will be called once for every request only.

Parameters
$requestRequest
$argsarray request arguments
$roleAssignmentsarray the operation role assignment, see getRoleAssignment() for more details.
Returns
boolean

Reimplemented from PKPHandler.

Definition at line 118 of file api/v1/submissions/PKPSubmissionHandler.inc.php.

References PKPHandler\addPolicy(), and APIHandler\getSlimRequest().

◆ delete()

PKPSubmissionHandler::delete (   $slimRequest,
  $response,
  $args 
)

Delete a submission

Parameters
$slimRequestRequest Slim request object
$responseResponse object
array$argsarguments
Returns
Response

Definition at line 407 of file api/v1/submissions/PKPSubmissionHandler.inc.php.

References PKPServices\get(), PKPHandler\getAuthorizedContextObject(), DAORegistry\getDAO(), and APIHandler\getRequest().

◆ deletePublication()

PKPSubmissionHandler::deletePublication (   $slimRequest,
  $response,
  $args 
)

Delete one of this submission's publications

Published publications can not be deleted. First you must unpublish them. See self::unpublishPublication().

Parameters
$slimRequestRequest Slim request object
$responseResponse object
array$argsarguments
Returns
Response

Definition at line 832 of file api/v1/submissions/PKPSubmissionHandler.inc.php.

References PKPServices\get(), PKPHandler\getAuthorizedContextObject(), DAORegistry\getDAO(), and APIHandler\getRequest().

◆ edit()

PKPSubmissionHandler::edit (   $slimRequest,
  $response,
  $args 
)

Edit a submission

Parameters
$slimRequestRequest Slim request object
$responseResponse object
array$argsarguments
Returns
Response

Definition at line 356 of file api/v1/submissions/PKPSubmissionHandler.inc.php.

References APIHandler\convertStringsToSchema(), PKPServices\get(), PKPHandler\getAuthorizedContextObject(), DAORegistry\getDAO(), and APIHandler\getRequest().

◆ editPublication()

PKPSubmissionHandler::editPublication (   $slimRequest,
  $response,
  $args 
)

Edit one of this submission's publications

Parameters
$slimRequestRequest Slim request object
$responseResponse object
array$argsarguments
Returns
Response

Definition at line 663 of file api/v1/submissions/PKPSubmissionHandler.inc.php.

References APIHandler\convertStringsToSchema(), PKPServices\get(), PKPHandler\getAuthorizedContextObject(), DAORegistry\getDAO(), and APIHandler\getRequest().

◆ get()

PKPSubmissionHandler::get (   $slimRequest,
  $response,
  $args 
)

Get a single submission

Parameters
$slimRequestRequest Slim request object
$responseResponse object
array$argsarguments
Returns
Response

Definition at line 283 of file api/v1/submissions/PKPSubmissionHandler.inc.php.

References PKPServices\get(), PKPApplication\get(), PKPHandler\getAuthorizedContextObject(), DAORegistry\getDAO(), and AppLocale\requireComponents().

◆ getMany()

PKPSubmissionHandler::getMany (   $slimRequest,
  $response,
  $args 
)

Get a collection of submissions

Parameters
$slimRequestRequest Slim request object
$responseResponse object
array$argsarguments
Returns
Response

Definition at line 173 of file api/v1/submissions/PKPSubmissionHandler.inc.php.

References HookRegistry\call(), PKPServices\get(), PKPApplication\get(), PKPHandler\getAuthorizedContextObject(), and DAORegistry\getDAO().

◆ getParticipants()

PKPSubmissionHandler::getParticipants (   $slimRequest,
  $response,
  $args 
)

Get the participants assigned to a submission

This does not return reviewers.

Parameters
$slimRequestRequest Slim request object
$responseResponse object
array$argsarguments
Returns
Response

Definition at line 437 of file api/v1/submissions/PKPSubmissionHandler.inc.php.

References PKPServices\get(), PKPApplication\get(), and PKPHandler\getAuthorizedContextObject().

◆ getPublication()

PKPSubmissionHandler::getPublication (   $slimRequest,
  $response,
  $args 
)

Get one of this submission's publications

Parameters
$slimRequestRequest Slim request object
$responseResponse object
array$argsarguments
Returns
Response

Definition at line 523 of file api/v1/submissions/PKPSubmissionHandler.inc.php.

References PKPServices\get(), PKPHandler\getAuthorizedContextObject(), DAORegistry\getDAO(), and APIHandler\getRequest().

◆ getPublications()

PKPSubmissionHandler::getPublications (   $slimRequest,
  $response,
  $args 
)

Get all of this submissions's publications

Parameters
$slimRequestRequest Slim request object
$responseResponse object
$argsarray arguments
Returns
Response

Definition at line 478 of file api/v1/submissions/PKPSubmissionHandler.inc.php.

References PKPServices\get(), PKPHandler\getAuthorizedContextObject(), DAORegistry\getDAO(), and APIHandler\getRequest().

◆ getStepCount()

PKPSubmissionHandler::getStepCount ( )
abstract

Get the number of submission steps.

Returns
int

Reimplemented in SubmissionHandler.

Referenced by authorize(), and step().

◆ getStepsNumberAndLocaleKeys()

PKPSubmissionHandler::getStepsNumberAndLocaleKeys ( )
abstract

Get the step numbers and their corresponding title locale keys.

Returns
array

Reimplemented in SubmissionHandler.

Referenced by setupTemplate().

◆ index()

PKPSubmissionHandler::index (   $args,
  $request 
)

Redirect to the new submission wizard by default.

Parameters
$argsarray
$requestRequest

Reimplemented from PKPHandler.

Definition at line 81 of file pages/submission/PKPSubmissionHandler.inc.php.

◆ publishPublication()

PKPSubmissionHandler::publishPublication (   $slimRequest,
  $response,
  $args 
)

Publish one of this submission's publications

If this is a GET request, it will run the pre-publish validation checks and return errors but it will not perform the final publication step.

Parameters
$slimRequestRequest Slim request object
$responseResponse object
array$argsarguments
Returns
Response

Definition at line 736 of file api/v1/submissions/PKPSubmissionHandler.inc.php.

References PKPServices\get(), PKPHandler\getAuthorizedContextObject(), DAORegistry\getDAO(), APIHandler\getRequest(), and AppLocale\requireComponents().

◆ saveStep()

PKPSubmissionHandler::saveStep (   $args,
  $request 
)

Save a submission step.

Parameters
$argsarray first parameter is the step being saved
$requestRequest
Returns
JSONMessage JSON object

Definition at line 160 of file pages/submission/PKPSubmissionHandler.inc.php.

References HookRegistry\call(), PKPHandler\getAuthorizedContextObject(), and setupTemplate().

◆ setupTemplate()

PKPSubmissionHandler::setupTemplate (   $request)

Setup common template variables.

Parameters
$requestRequest

Reimplemented from PKPHandler.

Reimplemented in SubmissionHandler.

Definition at line 210 of file pages/submission/PKPSubmissionHandler.inc.php.

References PKPTemplateManager\getManager(), getStepsNumberAndLocaleKeys(), and AppLocale\requireComponents().

Referenced by saveStep(), step(), and wizard().

◆ step()

PKPSubmissionHandler::step (   $args,
  $request 
)

Display a step for the submission wizard. Displays submission index page if a valid step is not specified.

Parameters
$argsarray
$requestRequest
Returns
JSONMessage JSON object

Definition at line 118 of file pages/submission/PKPSubmissionHandler.inc.php.

References PKPServices\get(), PKPHandler\getAuthorizedContextObject(), PKPTemplateManager\getManager(), getStepCount(), and setupTemplate().

◆ unpublishPublication()

PKPSubmissionHandler::unpublishPublication (   $slimRequest,
  $response,
  $args 
)

Unpublish one of this submission's publications

Parameters
$slimRequestRequest Slim request object
$responseResponse object
array$argsarguments
Returns
Response

Definition at line 790 of file api/v1/submissions/PKPSubmissionHandler.inc.php.

References PKPServices\get(), PKPHandler\getAuthorizedContextObject(), DAORegistry\getDAO(), and APIHandler\getRequest().

◆ versionPublication()

PKPSubmissionHandler::versionPublication (   $slimRequest,
  $response,
  $args 
)

Create a new version of a publication

Parameters
$slimRequestRequest Slim request object
$responseResponse object
array$argsarguments
Returns
Response

Definition at line 609 of file api/v1/submissions/PKPSubmissionHandler.inc.php.

References PKPServices\get(), PKPHandler\getAuthorizedContextObject(), DAORegistry\getDAO(), and APIHandler\getRequest().

◆ wizard()

PKPSubmissionHandler::wizard (   $args,
  $request 
)

Display the tab set for the submission wizard.

Parameters
$argsarray
$requestPKPRequest

Definition at line 90 of file pages/submission/PKPSubmissionHandler.inc.php.

References PKPHandler\getAuthorizedContextObject(), PKPTemplateManager\getManager(), and setupTemplate().

Field Documentation

◆ $_isBackendPage

PKPSubmissionHandler::$_isBackendPage = true

The documentation for this class was generated from the following file: