19 declare(strict_types=1);
    39         $this->commonSettings = 
new ilSetting(
'common');
    44         $this->
ilCtrl->redirect($this->gui, 
'view-clientsettings');
    49         $chatSettings = 
new ilSetting(
'chatroom');
    50         if ($chatSettings->get(
'chat_enabled', 
'0')) {
    80         ilChatroomInstaller::ensureCorrectPublicChatroomTreeLocation(
$ref_id);
    85         ilChatroomInstaller::createDefaultPublicRoom(
true);
    86         $this->mainTpl->setOnScreenMessage(
'success', $this->ilLng->txt(
'public_chat_created'), 
true);
    92             isset($serverSettings[
'port'], $serverSettings[
'address']) &&
    95             $this->mainTpl->setOnScreenMessage(
'info', $this->ilLng->txt(
'chat_cannot_connect_to_server'));
   101         $furtherInformation = sprintf($this->ilLng->txt(
'server_further_information'), $this->
getReadmePath());
   102         $serverTpl = 
new ilTemplate(
'tpl.chatroom_serversettings.html', 
true, 
true, 
'Modules/Chatroom');
   103         $serverTpl->setVariable(
'VAL_SERVERSETTINGS_FORM', $form->
getHTML());
   104         $serverTpl->setVariable(
'LBL_SERVERSETTINGS_FURTHER_INFORMATION', $furtherInformation);
   119         $form = $factory->getClientSettingsForm();
   121         if (!$form->checkInput()) {
   122             $form->setValuesByPost();
   123             $this->clientsettings($form);
   127         $convIdleStateTime = max(1, (
int) $form->getInput(
'conversation_idle_state_in_minutes'));
   130             'name' => (string) $form->getInput(
'client_name'),
   131             'enable_osc' => (bool) $form->getInput(
'enable_osc'),
   132             'enable_browser_notifications' => (bool) $form->getInput(
'enable_browser_notifications'),
   133             'conversation_idle_state_in_minutes' => $convIdleStateTime,
   134             'chat_enabled' => (bool) $form->getInput(
'chat_enabled'),
   135             'auth' => $form->getInput(
'auth')
   138         if (!$settings[
'chat_enabled']) {
   139             $settings[
'enable_osc'] = 
false;
   142         $chatSettings = 
new ilSetting(
'chatroom');
   143         $chatSettings->set(
'chat_enabled', (
string) $settings[
'chat_enabled']);
   144         $chatSettings->set(
'enable_browser_notifications', (
string) $settings[
'enable_browser_notifications']);
   145         $chatSettings->set(
'conversation_idle_state_in_minutes', (
string) $convIdleStateTime);
   146         $chatSettings->set(
'enable_osc', (
string) $settings[
'enable_osc']);
   148         $adminSettings = 
new ilChatroomAdmin($this->gui->getObject()->getId());
   152         $fileHandler->createClientConfigFile($settings);
   154         $this->mainTpl->setOnScreenMessage(
'success', $this->ilLng->txt(
'settings_has_been_saved'), 
true);
   155         $this->
ilCtrl->redirect($this->gui, 
'view-clientsettings');
   163         $this->gui->switchToVisibleMode();
   165         $adminSettings = 
new ilChatroomAdmin($this->gui->getObject()->getId());
   168         if ($form === null) {
   169             $clientSettings = array_map(
   170                 static fn($value) => is_int($value) ? (
string) $value : $value,
   171                 $adminSettings->loadClientSettings()
   174             $form = $factory->getClientSettingsForm();
   175             $form->setValuesByArray($clientSettings);
   180         $form->setTitle($this->ilLng->txt(
'general_settings_title'));
   182             $form->addCommandButton(
'view-saveClientSettings', $this->ilLng->txt(
'save'));
   185             $item = $form->getItemByPostVar(
'auth');
   186             $item->setIsReadOnly(
true);
   188         $form->setFormAction($this->
ilCtrl->getFormAction($this->gui, 
'view-saveClientSettings'));
   191         $this->mainTpl->setVariable(
'ADM_CONTENT', $settingsTpl->get());
 static checkUserPermissions($permissions, int $ref_id, bool $send_info=true)
Checks user permissions by given array and ref_id. 
 
Class ilChatroomAdminViewGUI. 
 
checkServerConnection(array $serverSettings)
 
redirectIfNoPermission($permission)
Checks for requested permissions and redirects if the permission check failed. 
 
static _hasUntrashedReference(int $obj_id)
checks whether an object has at least one reference that is not in trash 
 
ilSetting $commonSettings
 
static _lookupObjId(int $ref_id)
 
executeDefault(string $requestedMethod)
 
Class ilChatroomGUIHandler. 
 
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id 
 
const CHATROOM_README_PATH
 
static checkServerConnection(bool $use_cache=true)
 
__construct(ilChatroomObjectGUI $gui)
 
saveClientSettings(stdClass $settings)
Saves given client $settings into settingsTable. 
 
createSettingTemplate(ilPropertyFormGUI $form)