本文整理汇总了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 '';
}
示例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;
}
示例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 '';
}
示例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 '';
}
示例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 '';
}
示例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 '';
}
示例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 '';
}
示例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 '';
}
示例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 '';
}
示例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 '';
}
示例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 '';
}
示例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 '';
}
示例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 '';
}
示例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 '';
}
示例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 '';
}