-
Notifications
You must be signed in to change notification settings - Fork 7
/
TutorialExamplePlugin.php
41 lines (35 loc) · 1.03 KB
/
TutorialExamplePlugin.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
<?php
namespace APP\plugins\generic\tutorialExample;
use PKP\plugins\GenericPlugin;
class TutorialExamplePlugin extends GenericPlugin
{
public function register($category, $path, $mainContextId = NULL)
{
// Register the plugin even when it is not enabled
$success = parent::register($category, $path);
if ($success && $this->getEnabled()) {
// Do something when the plugin is enabled
}
return $success;
}
/**
* Provide a name for this plugin
*
* The name will appear in the Plugin Gallery where editors can
* install, enable and disable plugins.
*/
public function getDisplayName()
{
return 'Tutorial Example';
}
/**
* Provide a description for this plugin
*
* The description will appear in the Plugin Gallery where editors can
* install, enable and disable plugins.
*/
public function getDescription()
{
return 'This plugin is an example created for a tutorial on how to create a plugin.';
}
}