當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Session::getPluralNumber方法代碼示例

本文整理匯總了PHP中Session::getPluralNumber方法的典型用法代碼示例。如果您正苦於以下問題:PHP Session::getPluralNumber方法的具體用法?PHP Session::getPluralNumber怎麽用?PHP Session::getPluralNumber使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Session的用法示例。


在下文中一共展示了Session::getPluralNumber方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getTabNameForItem

 /**
  * @see CommonGLPI::getTabNameForItem()
  **/
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (!$withtemplate && Session::haveRight("reservation", READ)) {
         return self::getTypeName(Session::getPluralNumber());
     }
     return '';
 }
開發者ID:btry,項目名稱:glpi,代碼行數:10,代碼來源:reservation.class.php

示例2: getAdditionalMenuOptions

 /**
  * @see CommonGLPI::getAdditionalMenuOptions()
  **/
 static function getAdditionalMenuOptions()
 {
     if (static::canView()) {
         $options['networkportmigration']['title'] = NetworkPortMigration::getTypeName(Session::getPluralNumber());
         $options['networkportmigration']['page'] = NetworkPortMigration::getSearchURL(false);
         $options['networkportmigration']['search'] = NetworkPortMigration::getSearchURL(false);
         return $options;
     }
     return false;
 }
開發者ID:jose-martins,項目名稱:glpi,代碼行數:13,代碼來源:migrationcleaner.class.php

示例3: getTabNameForItem

 /**
  * @see CommonGLPI::getTabNameForItem()
  **/
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (self::canBeTranslated($item)) {
         if ($_SESSION['glpishow_count_on_tabs']) {
             return self::createTabEntry(self::getTypeName(Session::getPluralNumber()), self::getNumberOfTranslationsForItem($item));
         }
         return self::getTypeName(Session::getPluralNumber());
     }
     return '';
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:13,代碼來源:dropdowntranslation.class.php

示例4: getTabNameForItem

 /**
  * @see CommonGLPI::getTabNameForItem()
  **/
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (!$withtemplate && $item->getType() == 'Computer' && Computer::canView()) {
         if ($_SESSION['glpishow_count_on_tabs']) {
             return self::createTabEntry(self::getTypeName(Session::getPluralNumber()), countElementsInTable('glpi_computervirtualmachines', "computers_id = '" . $item->getID() . "'\n                                                                 AND `is_deleted`='0'"));
         }
         return self::getTypeName(Session::getPluralNumber());
     }
     return '';
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:13,代碼來源:computervirtualmachine.class.php

示例5: getTabNameForItem

 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (!$withtemplate) {
         switch ($item->getType()) {
             case __CLASS__:
                 return array(1 => __('Main'), 2 => _n('Item', 'Items', Session::getPluralNumber()));
         }
     }
     return '';
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:10,代碼來源:budget.class.php

示例6: getTabNameForItem

 /**
  * @see CommonGLPI::getTabNameForItem()
  **/
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (!$withtemplate && $item->getType() == 'Computer' && Computer::canView()) {
         $nb = 0;
         if ($_SESSION['glpishow_count_on_tabs']) {
             $nb = countElementsInTable('glpi_computervirtualmachines', ['computers_id' => $item->getID(), 'is_deleted' => 0]);
         }
         return self::createTabEntry(self::getTypeName(Session::getPluralNumber()), $nb);
     }
     return '';
 }
開發者ID:glpi-project,項目名稱:glpi,代碼行數:14,代碼來源:computervirtualmachine.class.php

示例7: getTabNameForItem

 /**
  * @see CommonGLPI::getTabNameForItem()
  **/
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     // can exists for template
     if ($item->getType() == static::$itemtype && static::canView()) {
         if ($_SESSION['glpishow_count_on_tabs']) {
             return self::createTabEntry(self::getTypeName(Session::getPluralNumber()), countElementsInTable($this->getTable(), "`" . $item->getForeignKeyField() . "`\n                                                                = '" . $item->getID() . "'"));
         }
         return self::getTypeName(Session::getPluralNumber());
     }
     return '';
 }
開發者ID:JULIO8,項目名稱:respaldo_glpi,代碼行數:14,代碼來源:commonitilcost.class.php

示例8: getTabNameForItem

 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (!$withtemplate && $item->getType() == $this->getType()) {
         $nb = 0;
         if ($_SESSION['glpishow_count_on_tabs']) {
             $nb = countElementsInTable($this->getTable(), "`" . $this->getForeignKeyField() . "` = '" . $item->getID() . "'");
         }
         return self::createTabEntry($this->getTypeName(Session::getPluralNumber()), $nb);
     }
     return '';
 }
開發者ID:korial29,項目名稱:glpi,代碼行數:11,代碼來源:commontreedropdown.class.php

示例9: getTabNameForItem

 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if ($item->getType() == __CLASS__) {
         $tabs[1] = __('Personal View');
         $tabs[2] = __('Group View');
         $tabs[3] = __('Global View');
         $tabs[4] = _n('RSS feed', 'RSS feeds', Session::getPluralNumber());
         return $tabs;
     }
     return '';
 }
開發者ID:JULIO8,項目名稱:respaldo_glpi,代碼行數:11,代碼來源:central.class.php

示例10: getTabNameForItem

 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     // can exists for template
     if ($item->getType() == 'TicketTemplate' && Session::haveRight("tickettemplate", READ)) {
         if ($_SESSION['glpishow_count_on_tabs']) {
             return self::createTabEntry(self::getTypeName(Session::getPluralNumber()), countElementsInTable($this->getTable(), "`tickettemplates_id`\n                                                               = '" . $item->getID() . "'"));
         }
         return self::getTypeName(Session::getPluralNumber());
     }
     return '';
 }
開發者ID:JULIO8,項目名稱:respaldo_glpi,代碼行數:11,代碼來源:tickettemplatemandatoryfield.class.php

示例11: getTabNameForItem

 /**
  * @see CommonGLPI::getTabNameForItem()
  **/
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     // can exists for template
     if ($item->getType() == 'Contract' && Contract::canView()) {
         if ($_SESSION['glpishow_count_on_tabs']) {
             return self::createTabEntry(self::getTypeName(Session::getPluralNumber()), countElementsInTable('glpi_contractcosts', "contracts_id = '" . $item->getID() . "'"));
         }
         return self::getTypeName(Session::getPluralNumber());
     }
     return '';
 }
開發者ID:JULIO8,項目名稱:respaldo_glpi,代碼行數:14,代碼來源:contractcost.class.php

示例12: getTabNameForItem

 /**
  * @see CommonGLPI::getTabNameForItem()
  **/
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     // can exists for template
     if ($item->getType() == 'Computer' && Computer::canView()) {
         $nb = 0;
         if ($_SESSION['glpishow_count_on_tabs']) {
             $nb = countElementsInTable('glpi_computerdisks', "computers_id = '" . $item->getID() . "' AND `is_deleted`='0'");
         }
         return self::createTabEntry(self::getTypeName(Session::getPluralNumber()), $nb);
     }
     return '';
 }
開發者ID:stweil,項目名稱:glpi,代碼行數:15,代碼來源:computerdisk.class.php

示例13: getTabNameForItem

 /**
  * @see CommonGLPI::getTabNameForItem()
  **/
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     // can exists for template
     if ($item->getType() == 'Project' && Project::canView()) {
         $nb = 0;
         if ($_SESSION['glpishow_count_on_tabs']) {
             $nb = countElementsInTable('glpi_projectcosts', ['projects_id' => $item->getID()]);
         }
         return self::createTabEntry(self::getTypeName(Session::getPluralNumber()), $nb);
     }
     return '';
 }
開發者ID:glpi-project,項目名稱:glpi,代碼行數:15,代碼來源:projectcost.class.php

示例14: getTabNameForItem

 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (!$withtemplate && Printer::canView()) {
         switch ($item->getType()) {
             case 'CartridgeItem':
                 if ($_SESSION['glpishow_count_on_tabs']) {
                     return self::createTabEntry(PrinterModel::getTypeName(Session::getPluralNumber()), self::countForCartridgeItem($item));
                 }
                 return PrinterModel::getTypeName(Session::getPluralNumber());
                 break;
         }
     }
     return '';
 }
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:14,代碼來源:cartridgeitem_printermodel.class.php

示例15: getTabNameForItem

 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (!$withtemplate) {
         switch ($item->getType()) {
             case 'CronTask':
                 $ong = array();
                 $ong[1] = __('Statistics');
                 if ($_SESSION['glpishow_count_on_tabs']) {
                     $ong[2] = self::createTabEntry(_n('Log', 'Logs', Session::getPluralNumber()), countElementsInTable($this->getTable(), "crontasks_id\n                                                                        = '" . $item->getID() . "'\n                                                                       AND `state`\n                                                                        = '" . self::STATE_STOP . "' "));
                 } else {
                     $ong[2] = _n('Log', 'Logs', Session::getPluralNumber());
                 }
                 return $ong;
         }
     }
     return '';
 }
開發者ID:JULIO8,項目名稱:respaldo_glpi,代碼行數:17,代碼來源:crontasklog.class.php


注:本文中的Session::getPluralNumber方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。