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