36 $this->access->checkAccessAndThrowException(
'write');
39 return $this->
add($DIC);
40 case self::CMD_CREATE:
41 $this->access->checkAccessAndThrowException(
'write');
44 return $this->
create($DIC);
46 $this->access->checkAccessAndThrowException(
'write');
49 return $this->
edit($DIC);
50 case self::CMD_UPDATE:
51 $this->access->checkAccessAndThrowException(
'write');
54 return $this->
update($DIC);
55 case self::CMD_APPLY_FILTER:
56 $this->access->checkAccessAndThrowException(
'visible,read');
59 case self::CMD_RESET_FILTER:
60 $this->access->checkAccessAndThrowException(
'visible,read');
63 case self::CMD_VIEW_SUB_ITEMS:
64 $this->access->checkAccessAndThrowException(
'visible,read');
67 return $this->
index();
68 case self::CMD_SAVE_TABLE:
69 $this->access->checkAccessAndThrowException(
'write');
72 case self::CMD_CONFIRM_DELETE:
74 $this->access->checkAccessAndThrowException(
'write');
77 case self::CMD_CONFIRM_MOVE:
79 $this->access->checkAccessAndThrowException(
'write');
83 $this->access->checkAccessAndThrowException(
'write');
86 case self::CMD_DELETE:
87 $this->access->checkAccessAndThrowException(
'write');
90 case self::CMD_CANCEL:
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);
144 return $f->getHTML();
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);
Class ilMMAbstractItemGUI.
const CMD_RENDER_INTERRUPTIVE
Class ilMMSubItemTableGUI.
Class ilMMTopItemGUI ilMMSubItemGUI: ilObjMainMenuGUI ilMMSubItemGUI: ilMMItemTranslationGUI.
Class ilMMItemTranslationGUI.
Confirmation screen class.
determineCommand(string $standard, string $delete)