add ConfigItem hook for search

git-svn-id: https://forge.glpi-project.org/svn/example/trunk@151 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
moyooo 2011-01-04 11:02:55 +00:00
parent 0658e5c00f
commit 0139d5374d

View File

@ -100,6 +100,23 @@ function plugin_example_giveItem($type,$ID,$data,$num) {
return "";
}
function plugin_example_displayConfigItem($type, $ID, $data, $num) {
$searchopt = &Search::getOptions($type);
$table = $searchopt[$ID]["table"];
$field = $searchopt[$ID]["field"];
// Example of specific style options
// No need of the function if you do not have specific cases
switch ($table.'.'.$field) {
case "glpi_plugin_example_examples.name" :
return " style=\"background-color:#DDDDDD;\" ";
break;
}
return "";
}
function plugin_example_addDefaultJoin($type, $ref_table, &$already_link_tables) {
// Example of default JOIN clause