IPNetwork_Vlan::getTabNameForItem PHP Method

getTabNameForItem() public method

public getTabNameForItem ( CommonGLPI $item, $withtemplate )
$item CommonGLPI
    function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
    {
        if (!$withtemplate) {
            $nb = 0;
            switch ($item->getType()) {
                case 'IPNetwork':
                    if ($_SESSION['glpishow_count_on_tabs']) {
                        $nb = countElementsInTable($this->getTable(), ['ipnetworks_id' => $item->getID()]);
                    }
                    return self::createTabEntry(Vlan::getTypeName(), $nb);
            }
        }
        return '';
    }