-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhook.php
61 lines (52 loc) · 1.25 KB
/
hook.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
53
54
55
56
57
58
59
60
61
<?php
/**
* Plugin install process
*
* @return boolean
*/
function plugin_gsn_install()
{
global $PHPLOGGER;
$PHPLOGGER->addRecord(Monolog\Logger::WARNING, "GSN->install");
Config::setConfigurationValues('core', ['notifications_gsn' => 0]);
return true;
}
/**
* Plugin uninstall process
*
* @return boolean
*/
function plugin_gsn_uninstall()
{
global $PHPLOGGER;
$PHPLOGGER->addRecord(Monolog\Logger::WARNING, "GSN->uninstall");
Config::deleteConfigurationValues('core', ['notifications_gsn']);
return true;
}
/**
* here and below GLPI hooks are declared
*/
function plugin_gsn_item_add(Ticket $ticket)
{
return PluginGsnEvent::addTicket($ticket);
}
function plugin_gsn_item_update(Ticket $ticket)
{
return PluginGsnEvent::updateTicket($ticket);
}
function plugin_gsn_followup_add(ITILFollowup $followup)
{
return PluginGsnEvent::addFollowup($followup);
}
function plugin_gsn_followup_update(ITILFollowup $followup)
{
return PluginGsnEvent::updateFollowup($followup);
}
function plugin_gsn_approval_add(TicketValidation $approval)
{
return PluginGsnEvent::addApproval($approval);
}
function plugin_gsn_approval_update(TicketValidation $approval)
{
return PluginGsnEvent::updateApproval($approval);
}