21 parent::__construct($gui);
23 require_once
'Modules/Chatroom/classes/class.ilChatroomFormFactory.php';
24 require_once
'Modules/Chatroom/classes/class.ilChatroom.php';
25 require_once
'Modules/Chatroom/classes/class.ilChatroomInstaller.php';
31 public function saveGeneral()
40 $settingsForm = $formFactory->getSettingsForm();
42 if(!$settingsForm->checkInput())
44 $settingsForm->setValuesByPost();
49 $this->gui->object->setTitle($settingsForm->getInput(
'title'));
50 $this->gui->object->setDescription($settingsForm->getInput(
'desc'));
51 $this->gui->object->update();
54 $room = ilChatRoom::byObjectId($this->gui->object->getId());
58 $room =
new ilChatRoom();
59 $settings[
'object_id'] = $this->gui->object->getId();
61 $room->saveSettings($settings);
64 $ilCtrl->redirect($this->gui,
'settings-general');
84 ), $this->gui->ref_id)
87 $ilCtrl->setParameterByClass(
'ilrepositorygui',
'ref_id', ROOT_FOLDER_ID);
88 $ilCtrl->redirectByClass(
'ilrepositorygui',
'');
91 $chatSettings =
new ilSetting(
'chatroom');
92 if(!$chatSettings->get(
'chat_enabled'))
97 $this->gui->switchToVisibleMode();
101 $room = ilChatRoom::byObjectId($this->gui->object->getId());
105 $settingsForm = $formFactory->getSettingsForm();
108 'title' => $this->gui->object->getTitle(),
109 'desc' => $this->gui->object->getDescription(),
115 $settingsForm, array_merge($settings, $room->getSettings())
124 $settingsForm->setTitle($lng->txt(
'settings_title'));
125 $settingsForm->addCommandButton(
'settings-saveGeneral', $lng->txt(
'save'));
126 $settingsForm->setFormAction($ilCtrl->getFormAction($this->gui,
'settings-saveGeneral'));
128 $tpl->setVariable(
'ADM_CONTENT', $settingsForm->getHtml());
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Class ilChatroomSettingsGUI.
$errors general
Prepares and displays settings form.
executeDefault($requestedMethod)
__construct(ilChatroomObjectGUI $gui)
Constructor Requires ilChatroomFormFactory, ilChatroom and ilChatroomInstaller, sets $this->gui using...
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static checkUserPermissions($permissions, $ref_id, $send_info=true)
Checks user permissions by given array and ref_id.
Class ilChatroomGUIHandler.
Create styles array
The data for the language used.