-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomSubmissionWizardPlugin.inc.php
More file actions
41 lines (34 loc) · 1002 Bytes
/
CustomSubmissionWizardPlugin.inc.php
File metadata and controls
41 lines (34 loc) · 1002 Bytes
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
<?php
import('lib.pkp.classes.plugins.GenericPlugin');
class CustomSubmissionWizardPlugin 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];
$op = $params[1];
if ($page === 'submission') {
switch ($op) {
case 'wizard':
case 'step':
case 'saveStep':
case 'index':
$this->import('handlers.CustomSubmissionHandler');
define('HANDLER_CLASS', 'CustomSubmissionHandler');
break;
}
return true;
}
return false;
}
public function getDisplayName() {
return __('plugins.generic.customSubmissionWizard.name');
}
public function getDescription() {
return __('plugins.generic.customSubmissionWizard.description');
}
}