From e10f50a35d9facf2d2c7ead3dfe302a1c3ef1407 Mon Sep 17 00:00:00 2001 From: moyooo Date: Sun, 13 Apr 2008 17:03:09 +0000 Subject: [PATCH] [example] use dynamic export git-svn-id: https://forge.glpi-project.org/svn/example/trunk@43 349b9182-4a13-0410-896f-e5e9767dd1b3 --- setup.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/setup.php b/setup.php index f06e448..7d04dee 100755 --- a/setup.php +++ b/setup.php @@ -92,10 +92,10 @@ function plugin_init_example() { //function to populate planning $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"; - //function to populate planning + //function to populate user preferences $PLUGIN_HOOKS['user_preferences']['example']="plugin_user_preferences_example"; // Massive Action definition @@ -663,4 +663,16 @@ function plugin_user_preferences_example($parm){ echo ""; } +// 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; +} + ?>