-
Notifications
You must be signed in to change notification settings - Fork 0
/
ompstat.inc.php
36 lines (31 loc) · 1.04 KB
/
ompstat.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
<?php
//plugins/generic/ompstat/ompstat.inc.php
import('lib.pkp.classes.plugins.GenericPlugin');
import('lib.pkp.plugins.importexport.users.PKPUserImportExportPlugin');
import('plugins.generic.ompstat.ompstatDAO');
class ompstat extends GenericPlugin {
public function register($category, $path, $mainContextId = null) {
$success = parent::register($category, $path, $mainContextId);
if ($success && $this->getEnabled()) {
HookRegistry::register('LoadHandler', array($this, 'setPageHandler'));
}
return $success;
}
public function setPageHandler($hookName, $params) {
$page = $params[0];
if ($page === 'ompstat') {
$this->import('ompstatHandler');
define('HANDLER_CLASS', 'ompstatHandler');
return true;
}
return false;
}
//variavel sem funcao para passar ao handler e recuperar no tpl
public $meuTeste = "varivável do arquivo principal";
public function getDisplayName() {
return __('plugins.generic.ompstat.displayname');
}
public function getDescription() {
return __('plugins.generic.ompstat.description');
}
}