ILIAS  release_8 Revision v8.24
class.ilChatroomObjectGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26abstract class ilChatroomObjectGUI extends ilObjectGUI
27{
29
30 public function __construct($data, ?int $id = 0, bool $call_by_reference = true, bool $prepare_output = true)
31 {
33 global $DIC;
34
35 $this->http = $DIC->http();
36
38 }
39
40
46 protected function dispatchCall(string $gui, string $method): bool
47 {
48 $definition = $this->getObjectDefinition();
49 if ($definition->hasGUI($gui)) {
50 $definition->loadGUI($gui);
51 $guiHandler = $definition->buildGUI($gui, $this);
52 $guiHandler->execute($method);
53 return true;
54 }
55
56 return false;
57 }
58
59 abstract protected function getObjectDefinition(): ilChatroomObjectDefinition;
60
61 abstract public function getConnector(): ilChatroomServerConnector;
62
66 public function switchToVisibleMode(): void
67 {
68 $this->prepareOutput();
69 }
70
71 public function getAdminTabs(): void
72 {
73 if (
74 $this->http->wrapper()->query()->has('admin_mode') &&
75 $this->http->wrapper()->query()->retrieve(
76 'admin_mode',
77 $this->refinery->kindlyTo()->string()
78 ) === 'repository'
79 ) {
80 $this->ctrl->setParameterByClass(ilAdministrationGUI::class, 'admin_mode', 'settings');
81 $this->tabs_gui->setBackTarget(
82 $this->lng->txt('administration'),
83 $this->ctrl->getLinkTargetByClass(ilAdministrationGUI::class, 'frameset')
84 );
85 $this->ctrl->setParameterByClass(ilAdministrationGUI::class, 'admin_mode', 'repository');
86 }
87
88 if ($this->tree->getSavedNodeData($this->object->getRefId())) {
89 $this->tabs_gui->addTarget('trash', $this->ctrl->getLinkTarget($this, 'trash'), 'trash', get_class($this));
90 }
91 }
92}
getAdminTabs()
administration tabs show only permissions and trash folder
switchToVisibleMode()
Calls $this->prepareOutput() method.
dispatchCall(string $gui, string $method)
Class ilChatroomServerConnector.
Class ilObjectGUI Basic methods of all Output classes.
__construct($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
prepareOutput(bool $show_sub_objects=true)
global $DIC
Definition: feed.php:28
Interface GlobalHttpState.
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc