Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
CopyeditingFilesListbuilderHandler.inc.php
1 <?php
2 
16 import('lib.pkp.controllers.listbuilder.files.FilesListbuilderHandler');
17 
23  // Get access to the submission file constants.
24  import('lib.pkp.classes.submission.SubmissionFile');
25  parent::FilesListbuilderHandler(SUBMISSION_FILE_COPYEDIT);
26  }
27 
28 
29  //
30  // Implement template methods from PKPHandler
31  //
35  function authorize($request, &$args, $roleAssignments) {
36  return parent::authorize($request, $args, $roleAssignments, WORKFLOW_STAGE_ID_EDITING);
37  }
38 
39 
40  //
41  // Implement methods from FilesListbuilderHandler
42  //
46  function initialize($request) {
47  parent::initialize($request);
48  AppLocale::requireComponents(LOCALE_COMPONENT_PKP_EDITOR);
49  $this->setTitle('editor.submission.selectCopyedingFiles');
50  }
51 
55  function getOptions() {
56  import('lib.pkp.classes.submission.SubmissionFile');
57  $submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);
58 
59  $submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO'); /* @var $submissionFileDao SubmissionFileDAO */
60  $submissionFiles = $submissionFileDao->getLatestRevisions($submission->getId(), $this->getFileStage());
61 
62  return parent::getOptions($submissionFiles);
63  }
64 }
65 
66 ?>
static & getDAO($name, $dbconn=null)
Class for selecting files to add a user to for copyediting.
static requireComponents()
Base class for selecting files to add a user to.
& getAuthorizedContextObject($assocType)