ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilChatroomCreateGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(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 ilChatroomFormFactory.
Class ilChatroomGUIHandler.
Class ilChatroomCreateGUI.
executeDefault(string $requestedMethod)
static byObjectId(int $object_id)
$response