function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
{
// can exists for template
if ($item->getType() == 'Contract' && Contract::canView()) {
$nb = 0;
if ($_SESSION['glpishow_count_on_tabs']) {
$nb = countElementsInTable('glpi_contractcosts', ['contracts_id' => $item->getID()]);
}
return self::createTabEntry(self::getTypeName(Session::getPluralNumber()), $nb);
}
return '';
}