/
MySubmissionsListGridHandler.inc.php
79 lines (67 loc) · 1.85 KB
/
MySubmissionsListGridHandler.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
/**
* @file controllers/grid/submissions/mySubmissions/MySubmissionsListGridHandler.inc.php
*
* Copyright (c) 2014-2017 Simon Fraser University
* Copyright (c) 2000-2017 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class MySubmissionsListGridHandler
* @ingroup controllers_grid_submissions_mySubmissions
*
* @brief Handle author's submissions list grid requests (submissions the user has made).
*/
// Import grid base classes.
import('lib.pkp.controllers.grid.submissions.SubmissionsListGridHandler');
class MySubmissionsListGridHandler extends SubmissionsListGridHandler {
/**
* Constructor
*/
function __construct() {
parent::__construct();
$this->addRoleAssignment(
array(ROLE_ID_MANAGER, ROLE_ID_SUB_EDITOR, ROLE_ID_ASSISTANT, ROLE_ID_AUTHOR),
array('fetchGrid', 'fetchRows', 'fetchRow', 'deleteSubmission')
);
}
//
// Implement template methods from PKPHandler
//
/**
* @copydoc PKPHandler::initialize()
*/
function initialize($request) {
parent::initialize($request);
$this->setTitle('submission.mySubmissions');
}
//
// Implement methods from GridHandler
//
/**
* @copydoc GridHandler::loadData()
*/
protected function loadData($request, $filter) {
list($search, $column, $stageId, $sectionId) = $this->getFilterValues($filter);
$submissionDao = Application::getSubmissionDAO();
return $submissionDao->getUnpublishedByUserId(
$request->getUser()->getId(),
$request->getContext()->getId(),
$search,
$stageId,
$sectionId,
$this->getGridRangeInfo($request, $this->getId())
);
}
//
// Extend methods from SubmissionListGridHandler
//
/**
* @copyDoc SubmissionListGridHandler::getFilterColumns()
*/
function getFilterColumns() {
$columns = parent::getFilterColumns();
unset($columns['author']);
return $columns;
}
}
?>