Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
ApprovedProofFilesGridDataProvider.inc.php
1 <?php
2 
17 import('lib.pkp.classes.controllers.grid.GridDataProvider');
18 
24  parent::GridDataProvider();
25  }
26 
27 
28  //
29  // Overridden methods
30  //
31 
35  function getAuthorizationPolicy($request, $args, $roleAssignments) {
36  import('classes.security.authorization.SubmissionAccessPolicy');
37  $policy = new SubmissionAccessPolicy($request, $args, $roleAssignments);
38  import('lib.pkp.classes.security.authorization.internal.WorkflowStageRequiredPolicy');
39  $policy->addPolicy(new WorkflowStageRequiredPolicy(WORKFLOW_STAGE_ID_PRODUCTION));
40  import('classes.security.authorization.internal.PublicationFormatRequiredPolicy');
41  $policy->addPolicy(new PublicationFormatRequiredPolicy($request, $args));
42  return $policy;
43  }
44 
48  function loadData() {
49  $submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO');
50  $monograph = $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);
51  $publicationFormat = $this->getAuthorizedContextObject(ASSOC_TYPE_PUBLICATION_FORMAT);
52  return $submissionFileDao->getLatestRevisionsByAssocId(ASSOC_TYPE_PUBLICATION_FORMAT, $publicationFormat->getId(), $monograph->getId(), SUBMISSION_FILE_PROOF);
53  }
54 
58  function getRequestArgs() {
59  $monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);
60  $publicationFormat =& $this->getAuthorizedContextObject(ASSOC_TYPE_PUBLICATION_FORMAT);
61  return array(
62  'publicationFormatId' => $publicationFormat->getId(),
63  'submissionId' => $monograph->getId(),
64  );
65  }
66 }
67 
68 ?>
static & getDAO($name, $dbconn=null)
Policy that ensures that the given workflow stage is valid.
Policy that ensures that the request contains a valid publication format.
Class to control (write) access to submissions and (read) access to submission details in OMP...
Approved proof files grid data provider.
getAuthorizationPolicy($request, $args, $roleAssignments)
Provide access to grid data.
& getAuthorizedContextObject($assocType)