/** * Constructor * @param $request Request * @param $reviewRound ReviewRound The review round to upload to. * @param $uploaderRoles array The ids of all roles allowed to upload * in the context of this action. * @param $uploaderGroupIds The user group IDs of all uploaders */ function __construct($request, $reviewRound, $uploaderRoles, $uploaderGroupIds = null) { // Bring in the submission file constants. import('lib.pkp.classes.submission.SubmissionFile'); // Create the action arguments array. $actionArgs = array('fileStage' => SUBMISSION_FILE_REVIEW_REVISION, 'stageId' => $reviewRound->getStageId(), 'reviewRoundId' => $reviewRound->getId(), 'revisionOnly' => '1'); // Call the parent class constructor. parent::__construct($request, $reviewRound->getSubmissionId(), $reviewRound->getStageId(), $uploaderRoles, $uploaderGroupIds, $actionArgs, __('submission.review.uploadRevisionToRound', array('round' => $reviewRound->getRound())), __('submission.addFile')); }
/** * Constructor * @param $request Request * @param $submissionId integer The submission the file should be * uploaded to. * @param $stageId integer The workflow stage in which the file * uploader is being instantiated (one of the WORKFLOW_STAGE_ID_* * constants). * @param $uploaderRoles array The ids of all roles allowed to upload * in the context of this action. * @param $uploaderGroupIds array The ids of all allowed user groups * to upload in the context of this action, or null to permit all. * @param $fileStage integer The file stage the file should be * uploaded to (one of the SUBMISSION_FILE_* constants). * @param $assocType integer The type of the element the file should * be associated with (one fo the ASSOC_TYPE_* constants). * @param $assocId integer The id of the element the file should be * associated with. * @param $reviewRoundId int The current review round ID (if any) * @param $revisedFileId int Revised file ID, if any * @param $dependentFilesOnly bool whether to only include dependent * files in the Genres dropdown. */ function __construct($request, $submissionId, $stageId, $uploaderRoles, $uploaderGroupIds, $fileStage, $assocType = null, $assocId = null, $reviewRoundId = null, $revisedFileId = null, $dependentFilesOnly = false) { // Create the action arguments array. $actionArgs = array('fileStage' => $fileStage, 'reviewRoundId' => $reviewRoundId); if (is_numeric($assocType) && is_numeric($assocId)) { $actionArgs['assocType'] = (int) $assocType; $actionArgs['assocId'] = (int) $assocId; } if ($revisedFileId) { $actionArgs['revisedFileId'] = $revisedFileId; $actionArgs['revisionOnly'] = true; } if ($dependentFilesOnly) { $actionArgs['dependentFilesOnly'] = true; } // Identify text labels based on the file stage. $textLabels = AddFileLinkAction::_getTextLabels($fileStage); // Call the parent class constructor. parent::__construct($request, $submissionId, $stageId, $uploaderRoles, $uploaderGroupIds, $actionArgs, __($textLabels['wizardTitle']), __($textLabels['buttonLabel'])); }