ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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)
 {
Parameters
string$requestedMethod
Returns
mixed
} More...
 
- Public Member Functions inherited from ilChatroomGUIHandler
 __construct (ilChatroomObjectGUI $gui)
 
 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...
 
 sendResponse ($response)
 Sends a json encoded response and exits the php process. More...
 
 hasPermission ($permission)
 Checks for access with ilRbacSystem. 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
 
 $obj_service
 
 $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$

@TODO IN USE?

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

Member Function Documentation

◆ executeDefault()

ilChatroomCreateGUI::executeDefault (   $method)

{

Parameters
string$requestedMethod
Returns
mixed
}

Reimplemented from ilChatroomGUIHandler.

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

40 {
41 $this->gui->switchToVisibleMode();
42 $this->gui->createObject();
43 return;
44 }

Referenced by save().

+ 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.

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 }
Class ilChatroomFormFactory.
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

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

+ Here is the call graph for this function:

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