ILIAS  release_8 Revision v8.24
class.ilChatroomCreateGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
29{
30 public function save(): void
31 {
32 $formFactory = new ilChatroomFormFactory();
33 $form = $formFactory->getCreationForm();
34
35 if ($form->checkInput()) {
36 $roomObj = $this->gui->insertObject();
37 $room = ilChatroom::byObjectId($roomObj->getId());
38
39 $connector = $this->gui->getConnector();
40 $response = $connector->sendCreatePrivateRoom($room->getRoomId(), 0, $roomObj->getOwner(), $roomObj->getTitle());
41
42 $this->ilCtrl->setParameter($this->gui, 'ref_id', $this->gui->getRefId());
43 $this->ilCtrl->redirect($this->gui, 'settings-general');
44 } else {
45 $this->executeDefault('create');
46 }
47 }
48
49 public function executeDefault(string $requestedMethod): void
50 {
51 $this->gui->switchToVisibleMode();
52 $this->gui->createObject();
53 }
54}
Class ilChatroomCreateGUI.
executeDefault(string $requestedMethod)
Class ilChatroomFormFactory.
Class ilChatroomGUIHandler.
static byObjectId(int $object_id)
Class ilCtrl provides processing control methods.
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
@inheritDoc
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc
$response