3use ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\Hasher;
 
   36                $this->access->checkAccessAndThrowException(
"visible,read");
 
   39                return $this->
index($DIC);
 
   41                $this->access->checkAccessAndThrowException(
"write");
 
   44                return $this->
add($DIC);
 
   46                $this->access->checkAccessAndThrowException(
"write");
 
   49                return $this->
create($DIC);
 
   51                $this->access->checkAccessAndThrowException(
"write");
 
   54                return $this->
edit($DIC);
 
   56                $this->access->checkAccessAndThrowException(
"write");
 
   59                return $this->
update($DIC);
 
   61                $this->access->checkAccessAndThrowException(
"write");
 
   66                $this->access->checkAccessAndThrowException(
"write");
 
   70                $this->access->checkAccessAndThrowException(
"write");
 
   80                $this->access->checkAccessAndThrowException(
'write');
 
   84                $this->access->checkAccessAndThrowException(
"write");
 
   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) {
 
  285            foreach (
new DirectoryIterator(
$path) as $fileInfo) {
 
  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);
 
An exception for terminatinating execution or to throw for unit testing.
Confirmation screen class.
static registerIdentifications(string $class_name, string $purpose)
Class ilMMAbstractItemGUI.
renderInterruptiveModal()
determineCommand(string $standard, string $delete)
Class ilMMItemRepository.
Class ilMMItemTranslationGUI.
Class ilMMTopItemGUI @ilCtrl_IsCalledBy ilMMTopItemGUI: ilObjMainMenuGUI @ilCtrl_Calls ilMMTopItemGUI...
update(\ILIAS\DI\Container $DIC)
create(\ILIAS\DI\Container $DIC)
add(\ILIAS\DI\Container $DIC)
edit(\ILIAS\DI\Container $DIC)
const CMD_CONFIRM_RESTORE
const CMD_RENDER_INTERRUPTIVE
Class ilMMTopItemTableGUI.
if(array_key_exists('yes', $_REQUEST)) $attributes
Interface StaticMainMenuProvider.
hash(StreamInterface $stream, $algo, $rawOutput=false)
Calculate a hash of a Stream.
if(empty($password)) $table