function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { if (!$withtemplate && Consumable::canView()) { $nb = 0; switch ($item->getType()) { case 'ConsumableItem': if ($_SESSION['glpishow_count_on_tabs']) { $nb = self::countForConsumableItem($item); } return self::createTabEntry(self::getTypeName(Session::getPluralNumber()), $nb); } } return ''; }