mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-05-04 18:08:42 +02:00
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:
parent
0658e5c00f
commit
0139d5374d
17
hook.php
17
hook.php
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user