19declare(strict_types=1);
21use ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\Hasher;
54 $this->
access->checkAccessAndThrowException(
'write');
57 return $this->
add($DIC);
59 $this->
access->checkAccessAndThrowException(
'write');
62 return $this->
create($DIC);
64 $this->
access->checkAccessAndThrowException(
'write');
67 return $this->
edit($DIC);
69 $this->
access->checkAccessAndThrowException(
'write');
72 return $this->
update($DIC);
74 $this->
access->checkAccessAndThrowException(
'visible,read');
78 $this->
access->checkAccessAndThrowException(
'visible,read');
82 $this->
access->checkAccessAndThrowException(
'visible,read');
85 return $this->
index();
87 $this->
access->checkAccessAndThrowException(
'write');
92 $this->
access->checkAccessAndThrowException(
'write');
97 $this->
access->checkAccessAndThrowException(
'write');
101 $this->
access->checkAccessAndThrowException(
'write');
105 $this->
access->checkAccessAndThrowException(
'write');
112 $this->
access->checkAccessAndThrowException(
'write');
123 $r =
$DIC->http()->request()->getParsedBody();
124 foreach ($r[self::IDENTIFIER] as $identification_string =>
$data) {
125 $item = $this->
repository->getItemFacadeForIdentificationString($this->unhash($identification_string));
126 $position = (
int)
$data[
'position'];
127 $item->setPosition($position);
128 $item->setActiveStatus(isset(
$data[
'active']) &&
$data[
'active']);
129 $item->setParent($this->unhash((
string)
$data[
'parent']));
137 $next_class = $this->
ctrl->getNextClass();
139 if (
'' === $next_class) {
146 switch ($next_class) {
147 case strtolower(ilMMItemTranslationGUI::class):
150 $this->
ctrl->forwardCommand($g);
164 $f =
new ilMMSubitemFormGUI(
$DIC->ctrl(),
$DIC->ui()->factory(),
$DIC->ui()->renderer(), $this->lng, $this->repository->getItemFacade(), $this->repository);
166 return $f->getHTML();
176 $f =
new ilMMSubitemFormGUI(
$DIC->ctrl(),
$DIC->ui()->factory(),
$DIC->ui()->renderer(), $this->lng, $this->repository->getItemFacade(), $this->repository);
181 return $f->getHTML();
193 return $f->getHTML();
208 return $f->getHTML();
214 $table->writeFilterToSession();
222 $table->resetFilter();
223 $table->resetOffset();
234 if ($this->
access->hasUserPermissionTo(
'write')) {
244 $b->setUrl($this->
ctrl->getLinkTarget($this, self::CMD_FLUSH));
245 $b->setCaption($this->
lng->txt(self::CMD_FLUSH),
false);
252 $table->setShowRowsSelector(
false);
254 return $table->getHTML();
257 private function delete():
void
260 if ($item->isDeletable()) {
264 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_subitem_deleted"),
true);
270 $this->
ctrl->redirectByClass(self::class, self::CMD_VIEW_SUB_ITEMS);
279 $this->
ctrl->saveParameterByClass(self::class, self::IDENTIFIER);
282 $c->addItem(self::IDENTIFIER, $this->hash(
$i->getId()),
$i->getDefaultTitle());
283 $c->setFormAction($this->
ctrl->getFormActionByClass(self::class));
284 $c->setConfirm($this->
lng->txt(self::CMD_DELETE), self::CMD_DELETE);
285 $c->setCancel($this->
lng->txt(self::CMD_CANCEL), self::CMD_CANCEL);
286 $c->setHeaderText($this->
lng->txt(self::CMD_CONFIRM_DELETE));
288 return $c->getHTML();
297 $this->
ctrl->saveParameterByClass(self::class, self::IDENTIFIER);
300 $c->addItem(self::IDENTIFIER, $this->hash(
$i->getId()),
$i->getDefaultTitle());
301 $c->setFormAction($this->
ctrl->getFormActionByClass(self::class));
302 $c->setConfirm($this->
lng->txt(self::CMD_MOVE), self::CMD_MOVE);
303 $c->setCancel($this->
lng->txt(self::CMD_CANCEL), self::CMD_CANCEL);
304 $c->setHeaderText($this->
lng->txt(self::CMD_CONFIRM_MOVE));
306 return $c->getHTML();
312 if ($item->isInterchangeable()) {
313 $item->setParent(
'');
317 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_moved"),
true);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilMMAbstractItemGUI.
determineCommand(string $standard, string $delete)
Class ilMMItemTranslationGUI.
Class ilMMTopItemGUI @ilCtrl_IsCalledBy ilMMSubItemGUI: ilObjMainMenuGUI @ilCtrl_Calls ilMMSubItemGUI...
const CMD_RENDER_INTERRUPTIVE
dispatchCommand(string $cmd)
Class ilMMSubItemTableGUI.