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