当前位置: 首页>>代码示例>>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;未经允许,请勿转载。