3use ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\Hasher;
36 $this->access->checkAccessAndThrowException(
'write');
39 return $this->
add($DIC);
41 $this->access->checkAccessAndThrowException(
'write');
44 return $this->
create($DIC);
46 $this->access->checkAccessAndThrowException(
'write');
49 return $this->
edit($DIC);
51 $this->access->checkAccessAndThrowException(
'write');
54 return $this->
update($DIC);
56 $this->access->checkAccessAndThrowException(
'visible,read');
60 $this->access->checkAccessAndThrowException(
'visible,read');
64 $this->access->checkAccessAndThrowException(
'visible,read');
67 return $this->
index();
69 $this->access->checkAccessAndThrowException(
'write');
74 $this->access->checkAccessAndThrowException(
'write');
79 $this->access->checkAccessAndThrowException(
'write');
83 $this->access->checkAccessAndThrowException(
'write');
87 $this->access->checkAccessAndThrowException(
'write');
101 $r =
$DIC->http()->request()->getParsedBody();
102 foreach ($r[self::IDENTIFIER] as $identification_string =>
$data) {
103 $item = $this->
repository->getItemFacadeForIdentificationString($this->unhash($identification_string));
104 $position = (int)
$data[
'position'];
105 $item->setPosition($position);
106 $item->setActiveStatus(isset(
$data[
'active']) && (bool)
$data[
'active']);
107 $item->setParent($this->unhash((
string)
$data[
'parent']));
115 $next_class = $this->ctrl->getNextClass();
117 if (
'' === $next_class) {
124 switch ($next_class) {
125 case strtolower(ilMMItemTranslationGUI::class):
126 $this->tab_handling->initTabs(
ilObjMainMenuGUI::TAB_MAIN, self::CMD_VIEW_SUB_ITEMS,
true, $this->ctrl->getCallHistory()[2][
'class'] ? $this->ctrl->getCallHistory()[2][
'class'] :
"");
128 $this->ctrl->forwardCommand($g);
142 $f =
new ilMMSubitemFormGUI(
$DIC->ctrl(),
$DIC->ui()->factory(),
$DIC->ui()->renderer(), $this->lng, $this->repository->getItemFacade(), $this->repository);
144 return $f->getHTML();
154 $f =
new ilMMSubitemFormGUI(
$DIC->ctrl(),
$DIC->ui()->factory(),
$DIC->ui()->renderer(), $this->lng, $this->repository->getItemFacade(), $this->repository);
159 return $f->getHTML();
171 return $f->getHTML();
186 return $f->getHTML();
192 $table->writeFilterToSession();
200 $table->resetFilter();
201 $table->resetOffset();
212 if ($this->access->hasUserPermissionTo(
'write')) {
217 $this->toolbar->addButtonInstance(
$b);
222 $table->setShowRowsSelector(
false);
224 return $table->getHTML();
227 private function delete() :
void
230 if ($item->isCustom()) {
234 ilUtil::sendSuccess($this->lng->txt(
"msg_subitem_deleted"),
true);
240 $this->ctrl->redirectByClass(self::class, self::CMD_VIEW_SUB_ITEMS);
249 $this->ctrl->saveParameterByClass(self::class, self::IDENTIFIER);
252 $c->addItem(self::IDENTIFIER, $this->hash(
$i->getId()),
$i->getDefaultTitle());
253 $c->setFormAction($this->ctrl->getFormActionByClass(self::class));
254 $c->setConfirm($this->lng->txt(self::CMD_DELETE), self::CMD_DELETE);
255 $c->setCancel($this->lng->txt(self::CMD_CANCEL), self::CMD_CANCEL);
256 $c->setHeaderText($this->lng->txt(self::CMD_CONFIRM_DELETE));
258 return $c->getHTML();
267 $this->ctrl->saveParameterByClass(self::class, self::IDENTIFIER);
270 $c->addItem(self::IDENTIFIER, $this->hash(
$i->getId()),
$i->getDefaultTitle());
271 $c->setFormAction($this->ctrl->getFormActionByClass(self::class));
272 $c->setConfirm($this->lng->txt(self::CMD_MOVE), self::CMD_MOVE);
273 $c->setCancel($this->lng->txt(self::CMD_CANCEL), self::CMD_CANCEL);
274 $c->setHeaderText($this->lng->txt(self::CMD_CONFIRM_MOVE));
276 return $c->getHTML();
282 if ($item->isInterchangeable()) {
283 $item->setParent(
'');
287 ilUtil::sendSuccess($this->lng->txt(
"msg_moved"),
true);
An exception for terminatinating execution or to throw for unit testing.
Confirmation screen class.
Class ilMMAbstractItemGUI.
determineCommand(string $standard, string $delete)
Class ilMMItemTranslationGUI.
Class ilMMTopItemGUI @ilCtrl_IsCalledBy ilMMSubItemGUI: ilObjMainMenuGUI @ilCtrl_Calls ilMMSubItemGUI...
const CMD_RENDER_INTERRUPTIVE
Class ilMMSubItemTableGUI.