-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathsetup.php
More file actions
55 lines (44 loc) · 1.62 KB
/
Copy pathsetup.php
File metadata and controls
55 lines (44 loc) · 1.62 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
<?php
function plugin_version_protocolsmanager() {
return [
'name' => "Protocols manager",
'version' => '2.0.0',
'author' => 'Mateusz Nitka',
'license' => 'GPLv3+',
'homepage' => 'https://github.com/mateusznitka/protocolsmanager',
'minGlpiVersion' => '11.0',
];
}
function plugin_protocolsmanager_check_config() {
return true;
}
function plugin_protocolsmanager_getMenuContent() {
global $CFG_GLPI;
$page = $CFG_GLPI['root_doc'] . '/plugins/protocolsmanager/front/config.form.php';
return [
'title' => 'Protocols Manager',
'icon' => 'ti ti-file-description',
'page' => $page,
'links' => [
'search' => $page,
],
];
}
function plugin_protocolsmanager_check_prerequisites() {
if (version_compare(GLPI_VERSION, '11.0', '>=')) {
return true;
}
echo "This plugin requires GLPI 11.0 or higher.";
return false;
}
function plugin_init_protocolsmanager() {
global $PLUGIN_HOOKS;
$PLUGIN_HOOKS['csrf_compliant']['protocolsmanager'] = true;
$PLUGIN_HOOKS['config_page']['protocolsmanager'] = 'front/config.form.php';
$PLUGIN_HOOKS['menu_toadd']['protocolsmanager'] = ['config' => 'PluginProtocolsmanagerConfig'];
Plugin::registerClass('PluginProtocolsmanagerGenerate', ['addtabon' => ['User']]);
Plugin::registerClass('PluginProtocolsmanagerProfile', ['addtabon' => ['Profile']]);
Plugin::registerClass('PluginProtocolsmanagerConfig', ['addtabon' => ['Config']]);
$PLUGIN_HOOKS['add_css']['protocolsmanager'] = 'css/styles.css';
}
?>