mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-06-28 06:58:43 +02:00
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:
2
hook.php
2
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);
|
||||
|
@ -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 '';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user