implement getSpecificValueToDisplay() in Example class

git-svn-id: https://forge.glpi-project.org/svn/example/trunk@176 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
remicollet
2011-11-29 15:22:52 +00:00
parent bb4866548a
commit 1d573b94d3
2 changed files with 11 additions and 1 deletions

View File

@ -82,7 +82,7 @@ function plugin_example_getAddSearchOptions($itemtype) {
return $sopt; return $sopt;
} }
// See also PluginExampleExample::getSpecificValueToDisplay()
function plugin_example_giveItem($type,$ID,$data,$num) { function plugin_example_giveItem($type,$ID,$data,$num) {
$searchopt = &Search::getOptions($type); $searchopt = &Search::getOptions($type);

View File

@ -171,6 +171,16 @@ class PluginExampleExample extends CommonDBTM {
} }
return true; return true;
} }
static function getSpecificValueToDisplay($field, &$values, $options=array()) {
global $LANG;
switch ($field) {
case 'serial' :
return "S/N: ".$values[$field];
}
return '';
}
} }
?> ?>