Open Journal Systems  3.3.0
NewReviewRoundForm.inc.php
1 <?php
2 
16 import('lib.pkp.classes.controllers.modals.editorDecision.form.EditorDecisionForm');
17 import('lib.pkp.classes.submission.reviewRound.ReviewRound');
18 
20 
27  function __construct($submission, $decision = SUBMISSION_EDITOR_DECISION_NEW_ROUND, $stageId = null, $reviewRound) {
28  parent::__construct($submission, $decision, $stageId, 'controllers/modals/editorDecision/form/newReviewRoundForm.tpl', $reviewRound);
29  // WARNING: this constructor may be invoked dynamically by
30  // EditorDecisionHandler::_instantiateEditorDecision.
31  }
32 
33 
34  //
35  // Implement protected template methods from Form
36  //
41  function execute(...$functionArgs) {
42  $request = Application::get()->getRequest();
43 
44  // Retrieve the submission.
45  $submission = $this->getSubmission();
46 
47  // Get this form decision actions labels.
48  $actionLabels = (new EditorDecisionActionsManager())->getActionLabels($request->getContext(), $this->getStageId(), $this->_getDecisions());
49 
50  // Record the decision.
51  $reviewRound = $this->getReviewRound();
52  import('lib.pkp.classes.submission.action.EditorAction');
53  $editorAction = new EditorAction();
54  $editorAction->recordDecision($request, $submission, SUBMISSION_EDITOR_DECISION_NEW_ROUND, $actionLabels, $reviewRound);
55 
56  // Update the review round status.
57  $reviewRoundDao = DAORegistry::getDAO('ReviewRoundDAO'); /* @var $reviewRoundDao ReviewRoundDAO */
58  $reviewRoundDao->updateStatus($reviewRound, REVIEW_ROUND_STATUS_PENDING_REVIEWERS);
59 
60  // Create a new review round.
61  $newRound = $this->_initiateReviewRound(
62  $submission, $submission->getStageId(),
63  $request, REVIEW_ROUND_STATUS_PENDING_REVIEWERS
64  );
65 
66  parent::execute(...$functionArgs);
67 
68  return $newRound;
69  }
70 
71  //
72  // Private functions
73  //
78  function _getDecisions() {
79  return array(
80  SUBMISSION_EDITOR_DECISION_NEW_ROUND
81  );
82  }
83 }
84 
85 
NewReviewRoundForm\execute
execute(... $functionArgs)
Definition: NewReviewRoundForm.inc.php:41
EditorDecisionForm\getSubmission
getSubmission()
Definition: EditorDecisionForm.inc.php:81
DAORegistry\getDAO
static & getDAO($name, $dbconn=null)
Definition: DAORegistry.inc.php:57
EditorDecisionForm\getReviewRound
getReviewRound()
Definition: EditorDecisionForm.inc.php:97
NewReviewRoundForm\__construct
__construct($submission, $decision=SUBMISSION_EDITOR_DECISION_NEW_ROUND, $stageId=null, $reviewRound)
Definition: NewReviewRoundForm.inc.php:27
EditorDecisionActionsManager
Wrapper class for create and assign editor decisions actions to template manager.
Definition: EditorDecisionActionsManager.inc.php:33
NewReviewRoundForm
Form for creating a new review round (after the first)
Definition: NewReviewRoundForm.inc.php:19
NewReviewRoundForm\_getDecisions
_getDecisions()
Definition: NewReviewRoundForm.inc.php:78
EditorDecisionForm\_initiateReviewRound
_initiateReviewRound($submission, $stageId, $request, $status=null)
Definition: EditorDecisionForm.inc.php:150
EditorDecisionForm
Base class for the editor decision forms.
Definition: EditorDecisionForm.inc.php:21
EditorAction
Editor actions.
Definition: EditorAction.inc.php:19
PKPApplication\get
static get()
Definition: PKPApplication.inc.php:235
EditorDecisionForm\getStageId
getStageId()
Definition: EditorDecisionForm.inc.php:89