Ejemplo n.º 1
0
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (!$withtemplate) {
         $nb = 0;
         switch ($item->getType()) {
             case 'NetworkPort':
                 if ($_SESSION['glpishow_count_on_tabs']) {
                     $nb = countElementsInTable($this->getTable(), "networkports_id = '" . $item->getID() . "'");
                 }
                 return self::createTabEntry(Vlan::getTypeName(), $nb);
         }
     }
     return '';
 }
Ejemplo n.º 2
0
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (!$withtemplate) {
         switch ($item->getType()) {
             case 'IPNetwork':
                 if ($_SESSION['glpishow_count_on_tabs']) {
                     return self::createTabEntry(Vlan::getTypeName(), countElementsInTable($this->getTable(), "ipnetworks_id\n                                                                        = '" . $item->getID() . "'"));
                 }
                 return Vlan::getTypeName();
         }
     }
     return '';
 }