function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
{
if (!$withtemplate && Group::canUpdate()) {
$nb = 0;
switch ($item->getType()) {
case 'Group':
$ong = array();
if ($_SESSION['glpishow_count_on_tabs']) {
$nb = countElementsInTable($this->getTable(), ['groups_id' => $item->getID()]);
}
$ong[4] = self::createTabEntry(__('Child groups'), $nb);
if ($item->getField('is_itemgroup')) {
$ong[1] = __('Used items');
}
if ($item->getField('is_assign')) {
$ong[2] = __('Managed items');
}
if ($item->getField('is_usergroup') && Group::canUpdate() && Session::haveRight("user", User::UPDATEAUTHENT) && AuthLdap::useAuthLdap()) {
$ong[3] = __('LDAP directory link');
}
return $ong;
}
}
return '';
}