Repository navigation
Expand file tree
/
Copy pathConferencePlugin.php
More file actions
69 lines (57 loc) · 2.29 KB
/
Copy pathConferencePlugin.php
File metadata and controls
69 lines (57 loc) · 2.29 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
* @file plugins/generic/conference/ConferencePlugin.php
*
* Copyright (c) 2017-2025 Simon Fraser University
* Copyright (c) 2017-2025 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @class ConferencePlugin
*
* @ingroup plugins_generic_conference
*
* @brief Conference plugin class.
*/
namespace APP\plugins\generic\conference;
use APP\plugins\generic\conference\classes\IssueHandler;
use APP\plugins\generic\conference\classes\PluginHandler;
use APP\plugins\generic\conference\classes\PluginSchema;
use PKP\facades\Locale;
use PKP\plugins\GenericPlugin;
use PKP\plugins\Hook;
class ConferencePlugin extends GenericPlugin
{
public function register($category, $path, $mainContextId = null): bool
{
if (parent::register($category, $path, $mainContextId)) {
if ($this->getEnabled($mainContextId)) {
$issueHandler = new IssueHandler($this);
Hook::add('Templates::Editor::Issues::IssueData::AdditionalMetadata', $issueHandler->metadataFieldEdit(...));
Hook::add('issueform::execute', $issueHandler->formExecute(...));
Hook::add('issuedao::getAdditionalFieldNames', $issueHandler->handleAdditionalFieldNames(...));
$pluginHandler = new PluginHandler($this);
Hook::add('LoadComponentHandler', $pluginHandler->addRoles(...));
Hook::add('TemplateResource::getFilename', $this->_overridePluginTemplates(...));
Locale::registerPath($this->getPluginPath() . '/customLocale/', PHP_INT_MAX);
}
$pluginSchema = new PluginSchema();
Hook::add('Schema::get::issue', $pluginSchema->addToIssueSchema(...));
return true;
}
return false;
}
/** @copydoc Plugin::getDisplayName */
public function getDisplayName(): string
{
return __('plugins.generic.conference.displayName');
}
/** @copydoc Plugin::getDescription */
public function getDescription(): string
{
return __('plugins.generic.conference.description');
}
}
// For backwards compatibility -- expect this to be removed approx. OJS/OMP/OPS 3.6
if (!PKP_STRICT_MODE) {
class_alias('\APP\plugins\generic\conference\ConferencePlugin', '\ConferencePlugin');
}