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


PHP CommonGLPI::countVisibilities方法代碼示例

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


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

示例1: getTabNameForItem

 /**
  * @see CommonGLPI::getTabNameForItem()
  **/
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (Session::haveRight("reminder_public", "r")) {
         switch ($item->getType()) {
             case 'Reminder':
                 if ($item->canUpdate()) {
                     if ($_SESSION['glpishow_count_on_tabs']) {
                         return array(1 => self::createTabEntry(__('Targets'), $item->countVisibilities()));
                     }
                     return array(1 => __('Targets'));
                 }
         }
     }
     return '';
 }
開發者ID:gaforeror,項目名稱:glpi,代碼行數:18,代碼來源:reminder.class.php

示例2: getTabNameForItem

 /**
  * @see CommonGLPI::getTabNameForItem()
  **/
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (self::canView()) {
         $nb = 0;
         switch ($item->getType()) {
             case 'RSSFeed':
                 $showtab = array(1 => __('Content'));
                 if (session::haveRight('rssfeed_public', UPDATE)) {
                     if ($_SESSION['glpishow_count_on_tabs']) {
                         $nb = $item->countVisibilities();
                     }
                     $showtab[2] = self::createTabEntry(_n('Target', 'Targets', Session::getPluralNumber()), $nb);
                 }
                 return $showtab;
         }
     }
     return '';
 }
開發者ID:stweil,項目名稱:glpi,代碼行數:21,代碼來源:rssfeed.class.php

示例3: getTabNameForItem

 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (!$withtemplate) {
         switch ($item->getType()) {
             case __CLASS__:
                 $ong[1] = $this->getTypeName(1);
                 if ($item->canUpdate()) {
                     if ($_SESSION['glpishow_count_on_tabs']) {
                         $ong[2] = self::createTabEntry(__('Targets'), $item->countVisibilities());
                     } else {
                         $ong[2] = __('Targets');
                     }
                 }
                 return $ong;
         }
     }
     return '';
 }
開發者ID:gaforeror,項目名稱:glpi,代碼行數:18,代碼來源:knowbaseitem.class.php

示例4: getTabNameForItem

 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (!$withtemplate) {
         $nb = 0;
         switch ($item->getType()) {
             case __CLASS__:
                 $ong[1] = $this->getTypeName(1);
                 if ($item->canUpdateItem()) {
                     if ($_SESSION['glpishow_count_on_tabs']) {
                         $nb = $item->countVisibilities();
                     }
                     $ong[2] = self::createTabEntry(_n('Target', 'Targets', Session::getPluralNumber()), $nb);
                     $ong[3] = __('Edit');
                 }
                 return $ong;
         }
     }
     return '';
 }
開發者ID:jose-martins,項目名稱:glpi,代碼行數:19,代碼來源:knowbaseitem.class.php

示例5: getTabNameForItem

 /**
  * @see CommonGLPI::getTabNameForItem()
  **/
 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if (self::canView()) {
         switch ($item->getType()) {
             case 'Reminder':
                 if ($item->canUpdate()) {
                     if ($_SESSION['glpishow_count_on_tabs']) {
                         $nb = $item->countVisibilities();
                         return array(1 => self::createTabEntry(_n('Target', 'Targets', $nb), $nb));
                     }
                     return array(1 => _n('Target', 'Targets', Session::getPluralNumber()));
                 }
         }
     }
     return '';
 }
開發者ID:JULIO8,項目名稱:respaldo_glpi,代碼行數:19,代碼來源:reminder.class.php


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