Update plugin for new define of hook using array with itemtype

git-svn-id: https://forge.glpi-project.org/svn/example/trunk@135 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
moyooo
2010-02-09 08:58:00 +00:00
parent 29d5a94d0a
commit afc9a0a05b
3 changed files with 60 additions and 96 deletions

View File

@ -126,6 +126,20 @@ class PluginExampleExample extends CommonDBTM {
return 1;
}
// Hook done on before add item case
static function pre_item_add_example($item) {
addMessageAfterRedirect("Pre Add Computer Hook",true);
}
// Hook done on add item case
static function item_add_example($item) {
addMessageAfterRedirect("Add Computer Hook, ID=".$item->getField('id'),true);
return true;
}
}
?>