ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilChatroomCreateTask.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 
14 {
15 
16  private $gui;
17 
26  {
27  $this->gui = $gui;
28  }
29 
38  public function executeDefault($method)
39  {
40  $this->gui->switchToVisibleMode();
41  return $this->gui->createObject();
42  }
43 
49  public function save()
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  }
68 
69 }
70 
71 ?>