-
Notifications
You must be signed in to change notification settings - Fork 7
/
LMSPurchasesPlugin.php
52 lines (47 loc) · 1.61 KB
/
LMSPurchasesPlugin.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
<?php
/**
* LMSPurchasesPlugin
*
* @author Jarosław Kłopotek <[email protected]>
* @author Grzegorz Cichowski <[email protected]>
*/
class LMSPurchasesPlugin extends LMSPlugin
{
const PLUGIN_DIRECTORY_NAME = 'LMSPurchasesPlugin';
const PLUGIN_DB_VERSION = '2023071800';
const PLUGIN_SOFTWARE_VERSION = '1.0-beta';
const PLUGIN_NAME = 'Purchase Documents';
const PLUGIN_DESCRIPTION = 'Ewidencja dokumentów kosztowych.';
const PLUGIN_AUTHOR = 'Jarosław Kłopotek <[email protected]><br>';
const PLUGIN_DOC_URL = 'https://raw.githubusercontent.com/interduo/LMSPurchasesPlugin/main/README.md';
const PLUGIN_REPO_URL = 'https://github.com/interduo/LMSPurchasesPlugin';
private static $purchases = null;
public static function getPurchasesInstance()
{
if (empty(self::$purchases)) {
self::$purchases = new PURCHASES();
}
return self::$purchases;
}
public function registerHandlers()
{
$this->handlers = array(
'smarty_initialized' => array(
'class' => 'PurchasesInitHandler',
'method' => 'smartyInit'
),
'modules_dir_initialized' => array(
'class' => 'PurchasesInitHandler',
'method' => 'ModulesDirInit',
),
'menu_initialized' => array(
'class' => 'PurchasesInitHandler',
'method' => 'menuInit',
),
'access_table_initialized' => array(
'class' => 'PurchasesInitHandler',
'method' => 'accessTableInit'
),
);
}
}