ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilChatroomObjectGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 abstract 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 
44  protected function dispatchCall(string $gui, string $method): bool
45  {
46  $definition = $this->getObjectDefinition();
47  if ($definition->hasGUI($gui)) {
48  $definition->loadGUI($gui);
49  $guiHandler = $definition->buildGUI($gui, $this);
50  $guiHandler->execute($method);
51  return true;
52  }
53 
54  return false;
55  }
56 
57  abstract protected function getObjectDefinition(): ilChatroomObjectDefinition;
58 
59  abstract public function getConnector(): ilChatroomServerConnector;
60 
64  public function switchToVisibleMode(): void
65  {
66  $this->prepareOutput();
67  }
68 
69  public function getAdminTabs(): void
70  {
71  if (
72  $this->http->wrapper()->query()->has('admin_mode') &&
73  $this->http->wrapper()->query()->retrieve(
74  'admin_mode',
75  $this->refinery->kindlyTo()->string()
76  ) === 'repository'
77  ) {
78  $this->ctrl->setParameterByClass(ilAdministrationGUI::class, 'admin_mode', 'settings');
79  $this->tabs_gui->setBackTarget(
80  $this->lng->txt('administration'),
81  $this->ctrl->getLinkTargetByClass(ilAdministrationGUI::class, 'frameset')
82  );
83  $this->ctrl->setParameterByClass(ilAdministrationGUI::class, 'admin_mode', 'repository');
84  }
85 
86  if ($this->tree->getSavedNodeData($this->object->getRefId())) {
87  $this->tabs_gui->addTarget('trash', $this->ctrl->getLinkTarget($this, 'trash'), 'trash', $this::class);
88  }
89  }
90 }
Interface GlobalHttpState.
__construct($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
prepareOutput(bool $show_sub_objects=true)
switchToVisibleMode()
Calls $this->prepareOutput() method.
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
__construct(VocabulariesInterface $vocabularies)
Class ilChatroomServerConnector.
Class ilObjectGUI Basic methods of all Output classes.
dispatchCall(string $gui, string $method)