19 declare(strict_types=1);
38 $this->
ui = $DIC->ui();
39 $this->
ctrl = $DIC->ctrl();
40 $this->
lng = $DIC->language();
42 $this->
lng->loadLanguageModule(
'rep');
48 $f = $this->
ui->factory();
51 foreach ($this->favoritesManager->getItemGroups() as $key => $group) {
53 foreach ($group as $item) {
54 $items[] =
$f->item()->standard(
55 $f->link()->standard($item->getTitle(), ilLink::_getLink($item->getRefId()))
56 )->withLeadIcon(
$f->symbol()->icon()->custom(
ilObject::_getIcon((
int) $item->getObjId()), $item->getTitle()));
58 if (count($items) > 0) {
59 $item_groups[] =
$f->item()->group((
string) $key, $items);
62 if (count($item_groups) > 0) {
63 $configureModal = $this->favoritesManager->getRemoveModal();
65 $config_item =
$f->item()->standard(
67 $this->favoritesManager->getRemoveMultipleActionText(),
68 $configureModal->getShowSignal()
71 array_unshift($item_groups,
$f->item()->group($this->
lng->txt(
''), [$config_item]));
72 $panel =
$f->panel()->secondary()->listing(
'', $item_groups);
74 return $this->
ui->renderer()->render([$panel, $configureModal]);
77 return $this->favoritesManager->getNoItemFoundContent();
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilSelectedItemsBlockGUI $favoritesManager
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct(?ilObjUser $user=null)