mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-06-28 15:08:42 +02:00
[example] use dynamic export
git-svn-id: https://forge.glpi-project.org/svn/example/trunk@43 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
16
setup.php
16
setup.php
@ -92,10 +92,10 @@ function plugin_init_example() {
|
|||||||
//function to populate planning
|
//function to populate planning
|
||||||
$PLUGIN_HOOKS['planning_populate']['example']="plugin_planning_populate_example";
|
$PLUGIN_HOOKS['planning_populate']['example']="plugin_planning_populate_example";
|
||||||
|
|
||||||
//function to populate planning
|
//function to display planning items
|
||||||
$PLUGIN_HOOKS['display_planning']['example']="plugin_display_planning_example";
|
$PLUGIN_HOOKS['display_planning']['example']="plugin_display_planning_example";
|
||||||
|
|
||||||
//function to populate planning
|
//function to populate user preferences
|
||||||
$PLUGIN_HOOKS['user_preferences']['example']="plugin_user_preferences_example";
|
$PLUGIN_HOOKS['user_preferences']['example']="plugin_user_preferences_example";
|
||||||
|
|
||||||
// Massive Action definition
|
// Massive Action definition
|
||||||
@ -663,4 +663,16 @@ function plugin_user_preferences_example($parm){
|
|||||||
echo "</form>";
|
echo "</form>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do special actions for dynamic report
|
||||||
|
function plugin_example_dynamicReport($parm){
|
||||||
|
if ($parm["item_type"]==PLUGIN_EXAMPLE_TYPE){
|
||||||
|
// Do all what you want for export depending on $parm
|
||||||
|
echo "Personalized export for type ".$parm["display_type"];
|
||||||
|
// Return true if personalized display is done
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// Return false if no specific display is done, then use standard display
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user