ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
ilChatroomCreateTask Class Reference

Class ilChatroomCreateTask. More...

+ Inheritance diagram for ilChatroomCreateTask:
+ Collaboration diagram for ilChatroomCreateTask:

Public Member Functions

 __construct (ilChatroomObjectGUI $gui)
 Constructor. More...
 
 executeDefault ($method)
 Switches gui to visible mode. More...
 
 save ()
 Inserts new object into gui. More...
 
- Public Member Functions inherited from ilChatroomTaskHandler
 __construct (ilChatroomObjectGUI $gui)
 
 executeDefault ($requestedMethod)
 

Private Attributes

 $gui
 

Detailed Description

Class ilChatroomCreateTask.

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

Definition at line 13 of file class.ilChatroomCreateTask.php.

Constructor & Destructor Documentation

◆ __construct()

ilChatroomCreateTask::__construct ( ilChatroomObjectGUI  $gui)

Constructor.

Sets $this->gui using given $gui

Parameters
ilChatroomObjectGUI$gui

Definition at line 25 of file class.ilChatroomCreateTask.php.

References $gui.

26  {
27  $this->gui = $gui;
28  }

Member Function Documentation

◆ executeDefault()

ilChatroomCreateTask::executeDefault (   $method)

Switches gui to visible mode.

Instantiates and prepares form.

ilTemplate $tpl ilObjUser $ilUser ilCtrl2 $ilCtrl

Parameters
string$method

Definition at line 38 of file class.ilChatroomCreateTask.php.

Referenced by save().

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

◆ save()

ilChatroomCreateTask::save ( )

Inserts new object into gui.

ilCtrl2 $ilCtrl

Definition at line 49 of file class.ilChatroomCreateTask.php.

References $ilCtrl, and executeDefault().

50  {
51  global $ilCtrl;
52 
53  require_once 'Modules/Chatroom/classes/class.ilChatroomFormFactory.php';
54  $formFactory = new ilChatroomFormFactory();
55  $form = $formFactory->getCreationForm();
56 
57  if( $form->checkInput() )
58  {
59  $this->gui->insertObject();
60  $ilCtrl->setParameter( $this->gui, 'ref_id', $this->gui->getRefId() );
61  $ilCtrl->redirect( $this->gui, 'settings-general' );
62  }
63  else
64  {
65  $this->executeDefault( 'create' );
66  }
67  }
Class ilChatroomFormFactory.
global $ilCtrl
Definition: ilias.php:18
executeDefault($method)
Switches gui to visible mode.
+ Here is the call graph for this function:

Field Documentation

◆ $gui

ilChatroomCreateTask::$gui
private

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

Referenced by __construct().


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