-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReviewersControlReportPlugin.inc.php
More file actions
48 lines (39 loc) · 1.3 KB
/
ReviewersControlReportPlugin.inc.php
File metadata and controls
48 lines (39 loc) · 1.3 KB
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
<?php
import('lib.pkp.classes.plugins.GenericPlugin');
class ReviewersControlReportPlugin extends GenericPlugin
{
public function register($category, $path, $mainContextId = null)
{
$success = parent::register($category, $path);
if ($success && $this->getEnabled()) {
PluginRegistry::register('reports', $this->getReportPlugin(), $this->getPluginPath());
HookRegistry::register('LoadComponentHandler', array($this, 'setupGridHandler'));
}
return $success;
}
public function getReportPlugin()
{
$this->import('ReviewersControlReportReportPlugin');
return new ReviewersControlReportReportPlugin();
}
public function getName(): string
{
return 'ReviewersControlReportPlugin';
}
public function getDisplayName(): string
{
return __('plugins.reports.reviewersControlReport.displayName');
}
public function getDescription(): string
{
return __('plugins.reports.reviewersControlReport.description');
}
public function setupGridHandler($hookName, $params)
{
$component = &$params[0];
if ($component == 'plugins.generic.reviewersControlReport.controllers.grid.ReviewersGridHandler') {
return true;
}
return false;
}
}