-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJournalMetadataPlugin.inc.php
63 lines (56 loc) · 1.86 KB
/
JournalMetadataPlugin.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
<?php
import('lib.pkp.classes.plugins.ReportPlugin');
import('plugins.reports.journalMetadata.report.JournalMetadata');
class JournalMetadataPlugin extends ReportPlugin
{
public function register($category, $path, $mainContextId = null): ?bool
{
$success = parent::register($category, $path, $mainContextId);
if ($success) {
$this->addLocaleData();
return true;
}
return $success;
}
public function getName(): string
{
return 'JournalMetadataPlugin';
}
public function getDisplayName(): string
{
return __('plugins.reports.journalMetadata.displayName');
}
public function getDescription(): string
{
return __('plugins.reports.journalMetadata.description');
}
public function display($args, $request): void
{
$dispatcher = $request->getDispatcher();
$templateManager = TemplateManager::getManager();
$context = $request->getContext();
$baseUrl = $request->getBaseUrl();
$templateManager->assign([
'breadcrumbs' => [
[
'id' => 'reports',
'name' => __('manager.statistics.reports'),
'url' => $request->getRouter()->url($request, null, 'stats', 'reports'),
],
[
'id' => 'journalMetadataPlugin',
'name' => __('plugins.reports.journalMetadata.displayName')
],
],
'pageTitle', __('plugins.reports.journalMetadata.displayName')
]);
$dispatcher = $request->getDispatcher();
$contextUrl = $dispatcher->url(
$request,
ROUTE_PAGE,
$context->getPath()
);
$journalMetadata = new JournalMetadata($context, $contextUrl);
$journalMetadata->getCsv();
}
}