コード例 #1
0
 /**
  * Constructor
  * @param $request Request
  * @param $monographId integer The monograph 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 $fileStage integer The file stage the file should be
  *  uploaded to (one of the MONOGRAPH_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.
  */
 function AddFileLinkAction(&$request, $monographId, $stageId, $uploaderRoles, $fileStage, $assocType = null, $assocId = null)
 {
     // Create the action arguments array.
     $actionArgs = array('fileStage' => $fileStage);
     if (is_numeric($assocType) && is_numeric($assocId)) {
         $actionArgs['assocType'] = (int) $assocType;
         $actionArgs['assocId'] = (int) $assocId;
     }
     // Identify text labels based on the file stage.
     $textLabels = AddFileLinkAction::_getTextLabels($fileStage);
     // Call the parent class constructor.
     parent::BaseAddFileLinkAction($request, $monographId, $stageId, $uploaderRoles, $actionArgs, __($textLabels['wizardTitle']), __($textLabels['buttonLabel']));
 }
コード例 #2
0
 /**
  * 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 $dependentFilesOnly bool whether to only include dependent
  *  files in the Genres dropdown.
  */
 function AddFileLinkAction($request, $submissionId, $stageId, $uploaderRoles, $uploaderGroupIds, $fileStage, $assocType = null, $assocId = null, $reviewRoundId = 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 ($dependentFilesOnly) {
         $actionArgs['dependentFilesOnly'] = true;
     }
     // Identify text labels based on the file stage.
     $textLabels = AddFileLinkAction::_getTextLabels($fileStage);
     // Call the parent class constructor.
     parent::BaseAddFileLinkAction($request, $submissionId, $stageId, $uploaderRoles, $uploaderGroupIds, $actionArgs, __($textLabels['wizardTitle']), __($textLabels['buttonLabel']));
 }