mirror of
				https://github.com/pluginsGLPI/example.git
				synced 2025-10-31 11:53:30 +01:00 
			
		
		
		
	[example] new hook for adding data for reportdynamic
git-svn-id: https://forge.glpi-project.org/svn/example/trunk@44 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
		
							
								
								
									
										18
									
								
								setup.php
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								setup.php
									
									
									
									
									
								
							| @@ -668,6 +668,11 @@ 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"]; | ||||
| 		echo 'with additional datas : <br>'; | ||||
| 		echo "Single data : add1 <br>"; | ||||
| 		print $parm['add1'].'<br>'; | ||||
| 		echo "Array data : add2 <br>"; | ||||
| 		printCleanArray($parm['add2']); | ||||
| 		// Return true if personalized display is done | ||||
| 		return true; | ||||
| 	} | ||||
| @@ -675,4 +680,17 @@ function plugin_example_dynamicReport($parm){ | ||||
| 	return false; | ||||
| } | ||||
|  | ||||
| // Add parameters to printPager in search system | ||||
| function plugin_example_addParamFordynamicReport($device_type){ | ||||
| 	if ($device_type==PLUGIN_EXAMPLE_TYPE){ | ||||
| 		// Return array data containing all params to add : may be single data or array data | ||||
| 		// Search config are available from session variable | ||||
| 		return array( | ||||
| 			'add1' => $_SESSION['glpisearch'][$device_type]['order'], | ||||
| 			'add2' => array('tutu'=>'Second Add','Other Data')); | ||||
| 	} | ||||
| 	// Return false or a non array data if not needed | ||||
| 	return false; | ||||
| } | ||||
|  | ||||
| ?> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user