Contract::getTypeName PHP Method

getTypeName() static public method

static public getTypeName ( $nb )
    static function getTypeName($nb = 0)
    {
        return _n('Contract', 'Contracts', $nb);
    }

Usage Example

Example #1
0
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (!$withtemplate) {
         $nb = 0;
         switch ($item->getType()) {
             case 'Supplier':
                 if (Contract::canView()) {
                     if ($_SESSION['glpishow_count_on_tabs']) {
                         $nb = self::countForSupplier($item);
                     }
                     return self::createTabEntry(Contract::getTypeName(Session::getPluralNumber()), $nb);
                 }
                 break;
             case 'Contract':
                 if (Session::haveRight("contact_enterprise", READ)) {
                     if ($_SESSION['glpishow_count_on_tabs']) {
                         $nb = self::countForContract($item);
                     }
                     return self::createTabEntry(Supplier::getTypeName(Session::getPluralNumber()), $nb);
                 }
                 break;
         }
     }
     return '';
 }
All Usage Examples Of Contract::getTypeName