ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilChatroomCreateGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
12{
16 public function save()
17 {
18 require_once 'Modules/Chatroom/classes/class.ilChatroomFormFactory.php';
19 $formFactory = new ilChatroomFormFactory();
20 $form = $formFactory->getCreationForm();
21
22 if ($form->checkInput()) {
23 $roomObj = $this->gui->insertObject();
24 $room = ilChatroom::byObjectId($roomObj->getId());
25
26 $connector = $this->gui->getConnector();
27 $response = $connector->sendCreatePrivateRoom($room->getRoomId(), 0, $roomObj->getOwner(), $roomObj->getTitle());
28
29 $this->ilCtrl->setParameter($this->gui, 'ref_id', $this->gui->getRefId());
30 $this->ilCtrl->redirect($this->gui, 'settings-general');
31 } else {
32 $this->executeDefault('create');
33 }
34 }
35
39 public function executeDefault($method)
40 {
41 $this->gui->switchToVisibleMode();
42 $this->gui->createObject();
43 return;
44 }
45}
An exception for terminatinating execution or to throw for unit testing.
Class ilChatroomCreateGUI.
save()
Inserts new object into gui.
Class ilChatroomFormFactory.
Class ilChatroomGUIHandler.
static byObjectId($object_id)
Returns ilChatroom object by given $object_id.
This class provides processing control methods.
redirect($a_gui_obj, $a_cmd="", $a_anchor="", $a_asynch=false)
Redirect to another command.
setParameter($a_obj, $a_parameter, $a_value)
Set parameters that should be passed a form and link of a gui class.
$response
if(isset($_POST['submit'])) $form