ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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?>
Class ilChatroomCreateTask.
__construct(ilChatroomObjectGUI $gui)
Constructor.
save()
Inserts new object into gui.
executeDefault($method)
Switches gui to visible mode.
Class ilChatroomFormFactory.
global $ilCtrl
Definition: ilias.php:18