Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
ExportableSubmissionsListGridHandler.inc.php
1 <?php
2 
16 // Import grid base classes.
17 import('lib.pkp.controllers.grid.submissions.SubmissionsListGridHandler');
18 import('lib.pkp.controllers.grid.submissions.exportableSubmissions.ExportableSubmissionsGridRow');
19 
25  parent::SubmissionsListGridHandler();
26  $this->addRoleAssignment(
27  array(ROLE_ID_MANAGER),
28  array('fetchGrid', 'fetchRow')
29  );
30  }
31 
32 
33  //
34  // Implement template methods from SubmissionListGridHandler
35  //
39  function getSubmissions($request) {
40  // Default implementation fetches all submissions.
41  $submissionDao = Application::getSubmissionDAO();
42  $context = $request->getContext();
43  return $submissionDao->getByStatus(
44  array(STATUS_DECLINED, STATUS_PUBLISHED, STATUS_QUEUED, STATUS_ARCHIVED),
45  null,
46  null,
47  $context?$context->getId():null,
48  $this->getGridRangeInfo($request, $this->getId())
49  );
50  }
51 
56  function &getRowInstance() {
57  $row = new ExportableSubmissionsGridRow();
58  return $row;
59  }
60 
64  function initFeatures($request, $args) {
65  if (!$request->getUserVar('hideSelectColumn')) {
66  import('lib.pkp.classes.controllers.grid.feature.selectableItems.SelectableItemsFeature');
67  return array(new SelectableItemsFeature());
68  } else {
69  return array();
70  }
71  }
72 
73 
74  //
75  // Implemented methods from GridHandler.
76  //
80  function isDataElementSelected($gridDataElement) {
81  return false; // Nothing is selected by default
82  }
83 
87  function getSelectName() {
88  return 'selectedSubmissions';
89  }
90 }
91 
92 ?>
Handle submission list grid requests.
Implements grid widgets selectable items functionality.
Handle exportable submissions list grid requests.
addRoleAssignment($roleIds, $operations)
static getSubmissionDAO()
getGridRangeInfo($request, $rangeName, $contextData=null)