mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-05-04 18:08:42 +02:00
Add getAddSearchOptionsNew example call
This commit is contained in:
parent
a16d0fb850
commit
e00f0e22b8
15
hook.php
15
hook.php
@ -77,6 +77,21 @@ function plugin_example_getAddSearchOptions($itemtype) {
|
||||
return $sopt;
|
||||
}
|
||||
|
||||
function plugin_example_getAddSearchOptionsNew($itemtype) {
|
||||
$options = [];
|
||||
if ($itemtype == 'Computer') {
|
||||
//Just for example, not working
|
||||
$options[] = [
|
||||
'id' => '1002',
|
||||
'table' => 'glpi_plugin_example_dropdowns',
|
||||
'field' => 'name',
|
||||
'linkfield' => 'plugin_example_dropdowns_id',
|
||||
'name' => __('Example plugin new', 'example')
|
||||
];
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
// See also PluginExampleExample::getSpecificValueToDisplay()
|
||||
function plugin_example_giveItem($type,$ID,$data,$num) {
|
||||
$searchopt = &Search::getOptions($type);
|
||||
|
Loading…
x
Reference in New Issue
Block a user