48 protected \ilLanguage
$lng;
52 protected \ILIAS\HTTP\Services
$http;
53 protected \ilGlobalTemplateInterface
$tpl;
62 protected \ILIAS\HTTP\Wrapper\ArrayBasedRequestWrapper
$query;
68 protected array $query_namespace = [
'orgu',
'posedit']
72 $this->
lng = $DIC->language();
73 $this->
lng->loadLanguageModule(
"orgu");
74 $this->
ctrl = $DIC->ctrl();
75 $this->tabsGUI = $DIC->tabs();
76 $this->
access = $DIC->access();
77 $this->
http = $DIC->http();
78 $this->tpl = $DIC->ui()->mainTemplate();
80 $this->query = $DIC->http()->wrapper()->query();
81 $this->request = $DIC->http()->request();
84 $here_uri = $this->data_factory->uri(
85 $this->request->getUri()->__toString()
87 $this->url_builder =
new URLBuilder($here_uri);
88 list($url_builder, $action_token, $row_id_token) =
89 $this->url_builder->acquireParameters($this->query_namespace,
"action",
"rowid");
94 $this->ui_factory = $DIC[
'ui.factory'];
95 $this->ui_renderer = $DIC[
'ui.renderer'];
108 abstract protected function index(): void;
125 $this->
ctrl->redirect($this, self::CMD_INDEX);
130 $this->tpl->setContent($html);
139 $this->
ctrl = $DIC->ctrl();
140 $this->
http = $DIC->http();
141 $this->
access = $DIC->access();
142 $this->tabsGUI = $DIC->tabs();
143 $this->
lng = $DIC->language();
144 $this->tpl = $DIC->ui()->mainTemplate();
145 $this->
lng->loadLanguageModule(
"orgu");
147 $cmd = $this->
ctrl->getCmd(self::CMD_INDEX);
149 if ($this->action_token &&
150 $this->query->has($this->action_token->getName())
152 $cmd = $this->query->retrieve(
153 $this->action_token->getName(),
158 $next_class = $this->
ctrl->getNextClass();
161 if (strtolower($class) === $next_class) {
162 $instance =
new $class();
164 $instance->setParentGui($this);
165 $this->
ctrl->forwardCommand($instance);
179 if ($this->checkRequestReferenceId()) {
188 $this->tabsGUI->addSubTab($subtab_id, $this->
lng->txt($subtab_id),
$url);
193 $this->tabsGUI->activateSubTab($subtab_id);
196 protected function checkRequestReferenceId()
211 $ref_id = $this->
http->request()->getQueryParams()[
"ref_id"];
222 if ($this->query->has($this->row_id_token->getName())) {
223 return $this->query->retrieve(
224 $this->row_id_token->getName(),
225 $this->
refinery->custom()->transformation(fn($v) => (
int) array_shift($v))
228 throw new \Exception(
'no position-id in query');
__construct(protected array $query_namespace=['orgu', 'posedit'])
ServerRequestInterface $request
pushSubTab(string $subtab_id, string $url)
setParentGui(BaseCommands $parent_gui)
ILIAS HTTP Wrapper ArrayBasedRequestWrapper $query
URLBuilderToken $row_id_token
ilGlobalTemplateInterface $tpl
ILIAS HTTP Services $http
static http()
Fetches the global http state from ILIAS.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
DataFactory $data_factory
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const CMD_DEFAULT_PERMISSIONS
activeSubTab(string $subtab_id)
URLBuilderToken $action_token