mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-06-28 06:58:43 +02:00
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:
10
hook.php
10
hook.php
@ -232,7 +232,8 @@ function plugin_example_MassiveActionsDisplay($options=array()) {
|
||||
case 'Computer' :
|
||||
switch ($options['action']) {
|
||||
case "plugin_example_DoIt" :
|
||||
echo " <input type='submit' name='massiveaction' class='submit' value='".
|
||||
|
||||
echo " <input type='hidden' name='toto' value='1'><input type='submit' name='massiveaction' class='submit' value='".
|
||||
$LANG["buttons"][2]."'> 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) {
|
||||
|
Reference in New Issue
Block a user