ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilObjChatroomAdminGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
32{
33 public function __construct($data = null, ?int $id = 0, bool $call_by_reference = true, bool $prepare_output = true)
34 {
35 $this->type = 'chta';
37 $this->lng->loadLanguageModule('chatroom_adm');
38 }
39
43 public static function _goto($ref_id): void
44 {
46 }
47
49 {
51 'Chatroom',
52 'admin'
53 );
54 }
55
56 public function executeCommand(): void
57 {
58 $next_class = strtolower($this->ctrl->getNextClass() ?? '');
59
60 $tabFactory = new ilChatroomTabGUIFactory($this);
61
62 switch ($next_class) {
63 case strtolower(ilPermissionGUI::class):
64 $tabFactory->getAdminTabsForCommand($this->ctrl->getCmd());
65 $this->prepareOutput();
66 $perm_gui = new ilPermissionGUI($this);
67 $this->ctrl->forwardCommand($perm_gui);
68 break;
69
70 case strtolower(ilObjChatroomGUI::class):
71 $this->prepareOutput();
72 $perm_gui = new ilObjChatroomGUI(
73 null,
74 $this->getRefId(),
75 true,
76 false
77 );
78 $this->ctrl->forwardCommand($perm_gui);
79 break;
80
81 default:
82 $tabFactory->getAdminTabsForCommand($this->ctrl->getCmd());
83 $res = explode('-', (string) $this->ctrl->getCmd(), 2);
84 if (!array_key_exists(1, $res)) {
85 $res[1] = '';
86 }
87
88 $this->dispatchCall($res[0], $res[1]);
89 }
90
91 if ($tabFactory->getActivatedTab() !== null &&
92 $this->tabs_gui->getActiveTab() !== $tabFactory->getActivatedTab()) {
93 $this->tabs_gui->activateTab($tabFactory->getActivatedTab());
94 }
95 }
96
98 {
100 }
101
102 public function getRefId(): int
103 {
104 return $this->object->getRefId();
105 }
106}
static getDefaultDefinitionWithCustomGUIPath(string $moduleName, string $guiScope='')
Returns an Instance of ilChatroomObjectDefinition, using given $moduleName and $guiScope as parameter...
dispatchCall(string $gui, string $method)
Class ilChatroomServerConnector.
Class ilChatroomTabGUIFactory.
Class ilObjChatroomAdminGUI GUI class for chatroom objects.
__construct($data=null, ?int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
@ilCtrl_Calls ilObjChatroomGUI: ilMDEditorGUI, ilInfoScreenGUI, ilPermissionGUI, ilObjectCopyGUI @ilC...
static _gotoRepositoryNode(int $ref_id, string $cmd="")
prepareOutput(bool $show_sub_objects=true)
$res
Definition: ltiservices.php:69
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc