SLT::getTabNameForItem PHP Method

getTabNameForItem() public method

See also: CommonGLPI::getTabNameForItem()
public getTabNameForItem ( CommonGLPI $item, $withtemplate )
$item CommonGLPI
    function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
    {
        if (!$withtemplate) {
            $nb = 0;
            switch ($item->getType()) {
                case 'SLA':
                    if ($_SESSION['glpishow_count_on_tabs']) {
                        $nb = countElementsInTable('glpi_slts', ['slas_id' => $item->getField('id')]);
                    }
                    return self::createTabEntry(self::getTypeName(1), $nb);
            }
        }
        return '';
    }