diff --git a/hook.php b/hook.php index 672de6f..aa18a03 100644 --- a/hook.php +++ b/hook.php @@ -82,7 +82,7 @@ function plugin_example_getAddSearchOptions($itemtype) { return $sopt; } - +// See also PluginExampleExample::getSpecificValueToDisplay() function plugin_example_giveItem($type,$ID,$data,$num) { $searchopt = &Search::getOptions($type); diff --git a/inc/example.class.php b/inc/example.class.php index 7795e1f..b1ad247 100644 --- a/inc/example.class.php +++ b/inc/example.class.php @@ -171,6 +171,16 @@ class PluginExampleExample extends CommonDBTM { } return true; } + + static function getSpecificValueToDisplay($field, &$values, $options=array()) { + global $LANG; + + switch ($field) { + case 'serial' : + return "S/N: ".$values[$field]; + } + return ''; + } } ?>