35 case self::CMD_VIEW_TOP_ITEMS:
36 $this->access->checkAccessAndThrowException(
"visible,read");
39 return $this->
index($DIC);
41 $this->access->checkAccessAndThrowException(
"write");
44 return $this->
add($DIC);
45 case self::CMD_CREATE:
46 $this->access->checkAccessAndThrowException(
"write");
49 return $this->
create($DIC);
51 $this->access->checkAccessAndThrowException(
"write");
54 return $this->
edit($DIC);
55 case self::CMD_UPDATE:
56 $this->access->checkAccessAndThrowException(
"write");
59 return $this->
update($DIC);
60 case self::CMD_SAVE_TABLE:
61 $this->access->checkAccessAndThrowException(
"write");
65 case self::CMD_CONFIRM_DELETE:
66 $this->access->checkAccessAndThrowException(
"write");
69 case self::CMD_DELETE:
70 $this->access->checkAccessAndThrowException(
"write");
73 case self::CMD_CANCEL:
76 case self::CMD_CONFIRM_RESTORE:
80 $this->access->checkAccessAndThrowException(
'write');
83 case self::CMD_RESTORE:
84 $this->access->checkAccessAndThrowException(
"write");
88 case self::CMD_RENDER_INTERRUPTIVE:
89 $this->access->checkAccessAndThrowException(
"write");
100 $r = $DIC->http()->request()->getParsedBody();
101 foreach (
$r[self::IDENTIFIER] as $identification_string =>
$data) {
102 $item = $this->
repository->getItemFacadeForIdentificationString($identification_string);
103 $item->setPosition((
int)
$data[
'position']);
104 $item->setActiveStatus((
bool) $data[
'active']);
112 $next_class = $this->ctrl->getNextClass();
114 if ($next_class ==
'') {
121 switch ($next_class) {
122 case strtolower(ilMMItemTranslationGUI::class):
125 $this->ctrl->forwardCommand($g);
137 if ($this->access->hasUserPermissionTo(
'write')) {
140 $b->setCaption($this->lng->txt(self::CMD_ADD),
false);
141 $b->setUrl($this->ctrl->getLinkTarget($this, self::CMD_ADD));
142 $this->toolbar->addButtonInstance($b);
147 $b->setUrl($this->ctrl->getLinkTarget($this, self::CMD_FLUSH));
148 $b->setCaption($this->lng->txt(self::CMD_FLUSH),
false);
149 $this->toolbar->addButtonInstance($b);
155 $table->setShowRowsSelector(
false);
162 $this->ctrl->redirectByClass(self::class, self::CMD_VIEW_TOP_ITEMS);
167 $this->ctrl->redirectByClass(self::class, self::CMD_CANCEL);
179 return $f->getHTML();
194 return $f->getHTML();
206 return $f->getHTML();
217 if ($item->isEditable()) {
223 return $f->getHTML();
229 private function delete()
232 if ($item->isDeletable()) {
235 ilUtil::sendSuccess($this->lng->txt(
"msg_topitem_deleted"),
true);
245 $this->ctrl->saveParameterByClass(self::class, self::IDENTIFIER);
248 $c->addItem(self::IDENTIFIER, $this->
hash(
$i->getId()),
$i->getDefaultTitle());
249 $c->setFormAction($this->ctrl->getFormActionByClass(self::class));
250 $c->setConfirm($this->lng->txt(self::CMD_DELETE), self::CMD_DELETE);
251 $c->setCancel($this->lng->txt(self::CMD_CANCEL), self::CMD_CANCEL);
252 $c->setHeaderText($this->lng->txt(self::CMD_CONFIRM_DELETE));
254 return $c->getHTML();
260 $c->setFormAction($this->ctrl->getFormActionByClass(self::class));
261 $c->setConfirm($this->lng->txt(self::CMD_DELETE), self::CMD_RESTORE);
262 $c->setCancel($this->lng->txt(self::CMD_CANCEL), self::CMD_CANCEL);
263 $c->setHeaderText($this->lng->txt(
'msg_restore_confirm'));
265 return $c->getHTML();
271 ilUtil::sendSuccess($this->lng->txt(
"msg_subitem_flushed"),
true);
284 $r =
function (
$path, $xml_name) {
286 $filename = $fileInfo->getPathname() . $xml_name;
287 if ($fileInfo->isDir() && !$fileInfo->isDot() && file_exists(
$filename)) {
289 if (isset(
$xml->gsproviders)) {
290 foreach (
$xml->gsproviders as $item) {
291 if (isset($item->gsprovider)) {
292 foreach ($item->gsprovider as
$provider) {
294 if (
$attributes->purpose == StaticMainMenuProvider::PURPOSE_MAINBAR) {
305 $r(
"./Services",
"/service.xml");
306 $r(
"./Modules",
"/module.xml");
308 ilGlobalCache::flushAll();
310 ilUtil::sendSuccess($this->lng->txt(
'msg_restored'),
true);
Class ilMMAbstractItemGUI.
const CMD_CONFIRM_RESTORE
const CMD_RENDER_INTERRUPTIVE
update(\ILIAS\DI\Container $DIC)
static registerIdentifications(string $class_name, string $purpose)
Class ilMMItemRepository.
add(\ILIAS\DI\Container $DIC)
edit(\ILIAS\DI\Container $DIC)
Class ilMMTopItemGUI ilMMTopItemGUI: ilObjMainMenuGUI ilMMTopItemGUI: ilMMItemTranslationGUI.
Class ilMMItemTranslationGUI.
if(array_key_exists('yes', $_REQUEST)) $attributes
create(\ILIAS\DI\Container $DIC)
if(empty($password)) $table
renderInterruptiveModal()
hash(StreamInterface $stream, $algo, $rawOutput=false)
Calculate a hash of a Stream.
Class ilMMTopItemTableGUI.
Confirmation screen class.
determineCommand(string $standard, string $delete)