예제 #1
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     //retrieve container for current tab
     $container = new self();
     $found_c = $container->find("`itemtype` = '" . get_class($item) . "'\n                                  AND `type` = 'tab' AND `name` = '{$tabnum}' AND is_active = 1");
     $tmp = array_shift($found_c);
     $c_id = $tmp['id'];
     return PluginFieldsField::showForTabContainer($c_id, $item->fields['id']);
 }
예제 #2
0
 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     //retrieve container for current tab
     $container = new self();
     $found_c = $container->find("`type` = 'tab' AND `name` = '{$tabnum}' AND is_active = 1");
     foreach ($found_c as $data) {
         $dataitemtypes = json_decode($data['itemtypes']);
         if (in_array(get_class($item), $dataitemtypes) != FALSE) {
             return PluginFieldsField::showForTabContainer($data['id'], $item->fields['id'], get_class($item));
         }
     }
 }