rename hook pre_item_add2 => post_prepareadd

git-svn-id: https://forge.glpi-project.org/svn/example/trunk@174 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
remicollet
2011-09-15 11:54:28 +00:00
parent 43be7e4a18
commit 77bf306f67
2 changed files with 10 additions and 10 deletions

View File

@ -129,18 +129,18 @@ class PluginExampleExample extends CommonDBTM {
// Hook done on before add item case (data from form, not altered)
static function pre_item_add_example($item) {
static function pre_item_add_computer(Computer $item) {
Session::addMessageAfterRedirect("Pre Add Computer Hook", true);
}
// Hook done on before add item case (data altered by object prepareInputForAdd)
static function pre_item_add2_example($item) {
Session::addMessageAfterRedirect("Pre Add2 Computer Hook", true);
static function post_prepareadd_computer(Computer$item) {
Session::addMessageAfterRedirect("Post prepareAdd Computer Hook", true);
}
// Hook done on add item case
static function item_add_example($item) {
static function item_add_computer(Computer$item) {
Session::addMessageAfterRedirect("Add Computer Hook, ID=".$item->getID(), true);
return true;