ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilChatroomCreateGUI Class Reference

Class ilChatroomCreateGUI. More...

+ Inheritance diagram for ilChatroomCreateGUI:
+ Collaboration diagram for ilChatroomCreateGUI:

Public Member Functions

 save ()
 Inserts new object into gui. More...
 
 executeDefault ($method)
 {} More...
 
- Public Member Functions inherited from ilChatroomGUIHandler
 __construct (ilChatroomObjectGUI $gui)
 
 sendResponse ($response)
 Sends a json encoded response and exits the php process. More...
 
 hasPermission ($permission)
 Checks for access with ilRbacSystem. More...
 
 execute ($method)
 Executes given $method if existing, otherwise executes executeDefault() method. More...
 
 executeDefault ($requestedMethod)
 
 redirectIfNoPermission ($permission)
 Checks for requested permissions and redirects if the permission check failed. More...
 
 isSuccessful ($response)
 Checks for success param in an json decoded response. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ilChatroomGUIHandler
 getRoomByObjectId ($objectId)
 
 exitIfNoRoomExists ($room)
 Checks if a ilChatroom exists. More...
 
 exitIfNoRoomPermission ($room, $subRoom, $chat_user)
 Check if user can moderate a chatroom. More...
 
 canModerate ($room, $subRoom, $user_id)
 Checks if the user has permission to moderate a ilChatroom. More...
 
 isMainRoom ($subRoomId)
 
- Protected Attributes inherited from ilChatroomGUIHandler
 $gui
 
 $ilUser
 
 $ilCtrl
 
 $ilLng
 
 $webDirectory
 
 $upload
 
 $rbacsystem
 
 $mainTpl
 
 $ilias
 
 $navigationHistory
 
 $tree
 
 $tabs
 

Detailed Description

Class ilChatroomCreateGUI.

Author
Jan Posselt jposs.nosp@m.elt@.nosp@m.datab.nosp@m.ay.d.nosp@m.e
Version
$Id$

IN USE?

Definition at line 11 of file class.ilChatroomCreateGUI.php.

Member Function Documentation

◆ executeDefault()

ilChatroomCreateGUI::executeDefault (   $method)

{}

Definition at line 39 of file class.ilChatroomCreateGUI.php.

Referenced by save().

40  {
41  $this->gui->switchToVisibleMode();
42  $this->gui->createObject();
43  return;
44  }
+ Here is the caller graph for this function:

◆ save()

ilChatroomCreateGUI::save ( )

Inserts new object into gui.

Definition at line 16 of file class.ilChatroomCreateGUI.php.

References $form, $response, ilChatroom\byObjectId(), executeDefault(), ilCtrl\redirect(), and ilCtrl\setParameter().

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  }
setParameter($a_obj, $a_parameter, $a_value)
Set parameters that should be passed a form and link of a gui class.
This class provides processing control methods.
Class ilChatroomFormFactory.
if(isset($_POST['submit'])) $form
static byObjectId($object_id)
Returns ilChatroom object by given $object_id.
$response
redirect($a_gui_obj, $a_cmd="", $a_anchor="", $a_asynch=false)
Redirect to another command.
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: