31        $this->lng = 
$DIC->language();
 
   42        $tokens = (array) explode(
'_', $value);
 
   45        foreach ($tokens as $token) {
 
   46            $value .= ucfirst($token);
 
   49        if ($upper_case_first === 
false) {
 
   50            $value = strtolower(substr($value, 0, 1)) . substr($value, 1);
 
   66        $stopCommands = array(
'create');
 
   68        if (in_array($command, $stopCommands)) {
 
   73        $public_room_ref = $settings->get(
'public_room_ref');
 
   76        $firstObjId = current(array_keys($objIds));
 
   78        $admin_ref  = current($refIds);
 
   80        $DIC->ctrl()->setParameterByClass(
'ilObjChatroomAdminGUI', 
'ref_id', $admin_ref);
 
   85                'link'       => 
$DIC->ctrl()->getLinkTargetByClass(
'ilObjChatroomAdminGUI', 
'view-clientsettings'),
 
   86                'permission' => 
'read',
 
   88                    'clientsettings' => array(
 
   89                        'lng'        => 
'client_settings',
 
   90                        'link'       => 
$DIC->ctrl()->getLinkTargetByClass(
'ilObjChatroomAdminGUI', 
'view-clientsettings'),
 
   91                        'permission' => 
'read' 
   93                    'serversettings' => array(
 
   94                        'lng'        => 
'server_settings',
 
   95                        'link'       => 
$DIC->ctrl()->getLinkTargetByClass(
'ilObjChatroomAdminGUI', 
'view-serversettings'),
 
   96                        'permission' => 
'read' 
  102                'link'       => 
$DIC->ctrl()->getLinkTargetByClass(
'ilObjChatroomAdminGUI', 
'smiley'),
 
  103                'permission' => 
'read' 
  106        $DIC->ctrl()->setParameterByClass(
'ilObjChatroomGUI', 
'ref_id', $public_room_ref);
 
  109            'lng'        => 
'public_chat_settings',
 
  110            'link'       => 
$DIC->ctrl()->getLinkTargetByClass(
'ilObjChatroomGUI', 
'settings-general'),
 
  111            'permission' => 
'write',
 
  115                    'link'       => 
$DIC->ctrl()->getLinkTarget($this->gui, 
'settings-general'),
 
  116                    'permission' => 
'write' 
  120                    'link'       => 
$DIC->ctrl()->getLinkTargetByClass(
'ilObjChatroomGUI', 
'ban-show'),
 
  121                    'permission' => 
'moderate' 
  126        $DIC->ctrl()->setParameterByClass(
'ilPermissionGUI', 
'ref_id', $public_room_ref);
 
  128            'lng'        => 
'public_chat_permissions',
 
  129            'link'       => 
$DIC->ctrl()->getLinkTargetByClass(
'ilPermissionGUI', 
'perm'),
 
  130            'permission' => 
'edit_permission',
 
  132        $DIC->ctrl()->clearParametersByClass(
'ilPermissionGUI');
 
  134        $DIC->ctrl()->setParameterByClass(
'ilPermissionGUI', 
'ref_id', $admin_ref);
 
  135        $config[
'perm_settings'] = array(
 
  136            'lng'        => 
'perm_settings',
 
  137            'link'       => 
$DIC->ctrl()->getLinkTargetByClass(
'ilpermissiongui', 
'perm'),
 
  138            'permission' => 
'edit_permission',
 
  140        $DIC->ctrl()->clearParametersByClass(
'ilPermissionGUI');
 
  142        $commandParts = explode(
'_', $command, 2);
 
  143        if ($command == 
'ban_show') {
 
  144            $commandParts[0] = 
'settings';
 
  145            $commandParts[1] = 
'ban';
 
  146        } elseif ($command == 
'settings_general') {
 
  147            $commandParts[0] = 
'settings';
 
  148            $commandParts[1] = 
'settings';
 
  149        } elseif ($command == 
'view_savesettings') {
 
  150            $commandParts[0] = 
'view';
 
  151            $commandParts[1] = 
'serversettings';
 
  152        } elseif ($command == 
'view_saveclientsettings') {
 
  153            $commandParts[0] = 
'view';
 
  154            $commandParts[1] = 
'clientsettings';
 
  155        } elseif (
$DIC->ctrl()->getCmdClass() == 
'ilpermissiongui' && $_REQUEST[
'ref_id'] == $public_room_ref) {
 
  156            $commandParts[0] = 
'perm';
 
  157            $DIC->ctrl()->setParameterByClass(
'ilPermissionGUI', 
'ref_id', $public_room_ref);
 
  158        } elseif (
$DIC->ctrl()->getCmdClass() == 
'ilpermissiongui' && $_REQUEST[
'ref_id'] == $admin_ref) {
 
  159            $commandParts[0] = 
'perm_settings';
 
  160            $DIC->ctrl()->setParameterByClass(
'ilPermissionGUI', 
'ref_id', $admin_ref);
 
  174        return strtolower(preg_replace(
'/(.*?)-(.*?)/', 
'$1_$2', $value));
 
  189        require_once 
'Modules/Chatroom/classes/class.ilChatroom.php';
 
  191            if (!$inRoom && !
$DIC->rbac()->system()->checkAccess($tabDefinition[
'permission'], $this->gui->getRefId())) {
 
  195            } elseif (isset($tabDefinition[
'enabled']) && !$tabDefinition[
'enabled']) {
 
  201            if ($command[0] == 
$id && isset($tabDefinition[
'subtabs']) &&
 
  202                is_array($tabDefinition[
'subtabs'])
 
  204                foreach ($tabDefinition[
'subtabs'] as $subid => $subTabDefinition) {
 
  205                    if (!$inRoom && !
$DIC->rbac()->system()->checkAccess($tabDefinition[
'permission'], $this->gui->getRefId())) {
 
  209                    } elseif (isset($subTabDefinition[
'enabled']) && !$subTabDefinition[
'enabled']) {
 
  214                        $this->
getLabel($subTabDefinition, $subid),
 
  215                        $subTabDefinition[
'link']
 
  233        if (isset($tabDefinition[
'lng'])) {
 
  234            return $this->lng->txt($tabDefinition[
'lng']);
 
  236            return $this->lng->txt(
$id);
 
  250        if (count($commandParts) > 1) {
 
  251            if (isset(
$config[$commandParts[0]])) {
 
  252                $DIC->tabs()->activateTab($commandParts[0]);
 
  254                if (isset(
$config[$commandParts[0]][
'subtabs'][$commandParts[1]])) {
 
  255                    $DIC->tabs()->activateSubTab($commandParts[1]);
 
  258        } elseif (count($commandParts) == 1) {
 
  259            $DIC->tabs()->activateTab($commandParts[0]);
 
  273        $stopCommands = array(
'create');
 
  275        if (in_array($command, $stopCommands)) {
 
  279        require_once 
'Modules/Chatroom/classes/class.ilChatroom.php';
 
  285                'link'       => 
$DIC->ctrl()->getLinkTarget($this->gui, 
'view'),
 
  286                'permission' => 
'read' 
  290                'link'       => 
$DIC->ctrl()->getLinkTarget($this->gui, 
'history-byday'),
 
  291                'permission' => 
'read',
 
  292                'enabled'    => $room ? $room->getSetting(
'enable_history') : 
false,
 
  295                        'lng'        => 
'history_by_day',
 
  296                        'link'       => 
$DIC->ctrl()->getLinkTarget($this->gui, 
'history-byday'),
 
  297                        'permission' => 
'read' 
  299                    'bysession' => array(
 
  300                        'lng'        => 
'history_by_session',
 
  301                        'link'       => 
$DIC->ctrl()->getLinkTarget($this->gui, 
'history-bysession'),
 
  302                        'permission' => 
'read' 
  307                'lng'        => 
'info_short',
 
  308                'link'       => 
$DIC->ctrl()->getLinkTargetByClass(array(get_class($this->gui), 
'ilinfoscreengui'), 
'info'),
 
  309                'permission' => 
'read' 
  313                'link'       => 
$DIC->ctrl()->getLinkTarget($this->gui, 
'settings-general'),
 
  314                'permission' => 
'write',
 
  317                        'lng'        => 
'settings_general',
 
  318                        'link'       => 
$DIC->ctrl()->getLinkTarget($this->gui, 
'settings-general'),
 
  319                        'permission' => 
'write' 
  325                'link'       => 
$DIC->ctrl()->getLinkTarget($this->gui, 
'ban-show'),
 
  326                'permission' => 
'moderate',
 
  329                        'lng'        => 
'bans_table',
 
  330                        'link'       => 
$DIC->ctrl()->getLinkTarget($this->gui, 
'ban-show'),
 
  331                        'permission' => 
'moderate' 
  337                'link'       =>  
$DIC->ctrl()->getLinkTargetByClass(
'ilexportgui', 
''),
 
  338                'permission' => 
'write' 
  341                'lng'        => 
'permissions',
 
  342                'link'       => 
$DIC->ctrl()->getLinkTargetByClass(
'ilpermissiongui', 
'perm'),
 
  343                'permission' => 
'edit_permission' 
  347        $commandParts = explode(
'_', $command, 2);
 
  349        if (
$DIC->ctrl()->getCmdClass() == 
'ilpermissiongui') {
 
  350            $commandParts[0] = 
'perm';
 
An exception for terminatinating execution or to throw for unit testing.
Class ilChatroomTabGUIFactory.
buildTabs(ilTabsGUI $tabs, $config, $command, $inRoom=true)
Builds tabs and subtabs using given $tabs, $config and $command parameters.
__construct(ilObjectGUI $gui)
activateTab(array $commandParts, $config)
Activates tab or subtab if existing.
getLabel($tabDefinition, $id)
Returns label for tab by $tabDefinition or $id.
static convertLowerCamelCaseToUnderscoreCaseConversion($value)
Convert a value given in lower camel case conversion to underscore case conversion (e....
static convertUnderscoreCaseToLowerCamelCaseConversion($value, $upper_case_first=false)
Convert a value given in underscore case conversion to lower camel case conversion (e....
getAdminTabsForCommand($command)
Builds $config and $commandparts arrays to assign them as parameters when calling $this->buildTabs an...
getTabsForCommand($command)
Builds $config and $commandparts arrays to assign them as parameters when calling $this->buildTabs an...
static byObjectId($object_id)
Returns ilChatroom object by given $object_id.
static checkUserPermissions($permissions, $ref_id, $send_info=true)
Checks user permissions by given array and ref_id.
Class ilObjectGUI Basic methods of all Output classes.
static _getObjectsByType($a_obj_type="", $a_owner="")
Get objects by type.
static _getAllReferences($a_id)
get all reference ids of object
if(!empty($this->data['faventry'])) $tabs
if(!array_key_exists('StateId', $_REQUEST)) $id