add item_empty hook

git-svn-id: https://forge.glpi-project.org/svn/example/trunk@145 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
moyooo
2010-10-12 15:02:02 +00:00
parent ac2400cb71
commit cba8235d1f
2 changed files with 17 additions and 11 deletions

View File

@ -232,7 +232,8 @@ function plugin_example_MassiveActionsDisplay($options=array()) {
case 'Computer' :
switch ($options['action']) {
case "plugin_example_DoIt" :
echo "&nbsp;<input type='submit' name='massiveaction' class='submit' value='".
echo "&nbsp;<input type='hidden' name='toto' value='1'><input type='submit' name='massiveaction' class='submit' value='".
$LANG["buttons"][2]."'>&nbsp;but do nothing :)";
break;
}
@ -348,6 +349,13 @@ function plugin_item_update_example($item) {
return true;
}
// Hook done on get empty item case
function plugin_item_empty_example($item) {
addMessageAfterRedirect("Empty Computer Hook",true);
return true;
}
// Hook done on before delete item case
function plugin_pre_item_delete_example($object) {