mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-05-05 02:18:42 +02:00
new hook 'post_init', see #2610
git-svn-id: https://forge.glpi-project.org/svn/example/trunk@153 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
parent
e28ae857b1
commit
e9366fba35
9
hook.php
9
hook.php
@ -788,4 +788,13 @@ function plugin_example_get_events(NotificationTargetTicket $target) {
|
|||||||
function plugin_example_get_datas(NotificationTargetTicket $target) {
|
function plugin_example_get_datas(NotificationTargetTicket $target) {
|
||||||
$target->datas['##ticket.example##'] = "Example datas";
|
$target->datas['##ticket.example##'] = "Example datas";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function plugin_example_postinit() {
|
||||||
|
global $CFG_GLPI;
|
||||||
|
|
||||||
|
// All plugins are initialized, so all types are registered
|
||||||
|
foreach ($CFG_GLPI["infocom_types"] as $type) {
|
||||||
|
// do something
|
||||||
|
}
|
||||||
|
}
|
||||||
?>
|
?>
|
@ -146,6 +146,8 @@ function plugin_init_example() {
|
|||||||
// Stats
|
// Stats
|
||||||
$PLUGIN_HOOKS['stats']['example'] = array('stat.php' => 'New stat',
|
$PLUGIN_HOOKS['stats']['example'] = array('stat.php' => 'New stat',
|
||||||
'stat.php?other' => 'New stats 2',);
|
'stat.php?other' => 'New stats 2',);
|
||||||
|
|
||||||
|
$PLUGIN_HOOKS['post_init']['example'] = 'plugin_example_postinit';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user