forked from ILIAS-eLearning/ILIAS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] 0042755: Failed test: Footer-Eintrag löschen
- Loading branch information
Showing
2 changed files
with
13 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ | |
use ILIAS\GlobalScreen\Scope\MainMenu\Collector\Renderer\Hasher; | ||
use ILIAS\GlobalScreen\UI\Footer\Groups\GroupsRepository; | ||
use ILIAS\GlobalScreen\UI\Footer\Translation\TranslationsRepositoryDB; | ||
use ILIAS\GlobalScreen_\UI\UIHelper; | ||
|
||
/** | ||
* @author Fabian Schmid <[email protected]> | ||
|
@@ -40,6 +41,7 @@ | |
final class ilFooterEntriesGUI | ||
{ | ||
use Hasher; | ||
use UIHelper; | ||
|
||
public const CMD_DEFAULT = 'index'; | ||
public const CMD_ADD = 'add'; | ||
|
@@ -254,17 +256,23 @@ protected function confirmDelete(): void | |
$items = []; | ||
|
||
foreach ($this->ui_handling->getIdentificationsFromRequest(self::GSFO_ID) as $id) { | ||
$item = $this->repository->get($id); | ||
if ($item === null) { | ||
$entry = $this->repository->get($id); | ||
if ($entry === null) { | ||
continue; | ||
} | ||
if ($item->isCore()) { | ||
if ($entry->isCore()) { | ||
$items[] = $this->ui_factory->modal()->interruptiveItem()->keyValue( | ||
$id, | ||
$entry->getTitle(), | ||
$this->translator->translate('info_not_deletable_core') . | ||
$this->ui_handling->render($this->nok($this->ui_factory)) | ||
); | ||
continue; | ||
} | ||
$items[] = $this->ui_factory->modal()->interruptiveItem()->keyValue( | ||
$id, | ||
$this->translator->translate('entry_title'), | ||
$item->getTitle() | ||
$entry->getTitle(), | ||
$this->ui_handling->render($this->ok($this->ui_factory)) | ||
); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters