ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
All Data Structures Namespaces Files Functions Variables Typedefs Modules Pages
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  {
21  global $ilCtrl;
22 
23  require_once 'Modules/Chatroom/classes/class.ilChatroomFormFactory.php';
24  $formFactory = new ilChatroomFormFactory();
25  $form = $formFactory->getCreationForm();
26 
27  if($form->checkInput())
28  {
29  $roomObj = $this->gui->insertObject();
30  $room = ilChatroom::byObjectId($roomObj->getId());
31 
32  $connector = $this->gui->getConnector();
33  $response = $connector->sendCreatePrivateRoom($room->getRoomId(), 0, $roomObj->getOwner(), $roomObj->getTitle());
34 
35  $ilCtrl->setParameter($this->gui, 'ref_id', $this->gui->getRefId());
36  $ilCtrl->redirect($this->gui, 'settings-general');
37  }
38  else
39  {
40  $this->executeDefault('create');
41  }
42  }
43 
47  public function executeDefault($method)
48  {
49  $this->gui->switchToVisibleMode();
50  return $this->gui->createObject();
51  }
52 }
Class ilChatroomFormFactory.
Class ilChatroomGUIHandler.
Class ilChatroomCreateGUI.
static byObjectId($object_id)
Returns ilChatroom object by given $object_id.