ILIAS  release_7 Revision v7.30-3-g800a261c036
ilFavouritesListGUI Class Reference

Favourites UI. More...

+ Collaboration diagram for ilFavouritesListGUI:

Public Member Functions

 __construct ($user=null)
 Constructor. More...
 
 render ()
 Render. More...
 

Protected Attributes

 $block_view
 
 $ui
 
 $ctrl
 

Detailed Description

Favourites UI.

Author
killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 10 of file class.ilFavouritesListGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilFavouritesListGUI::__construct (   $user = null)

Constructor.

Definition at line 31 of file class.ilFavouritesListGUI.php.

32 {
33 global $DIC;
34
35 if (is_null($user)) {
36 $user = $DIC->user();
37 }
38
39 $settings = new ilPDSelectedItemsBlockViewSettings($user);
40 $settings->parse();
41 $this->block_view = ilPDSelectedItemsBlockViewGUI::bySettings($settings);
42 $this->ui = $DIC->ui();
43 $this->ctrl = $DIC->ctrl();
44 $this->lng = $DIC->language();
45 $this->lng->loadLanguageModule("rep");
46 }
static bySettings(ilPDSelectedItemsBlockViewSettings $viewSettings)
global $DIC
Definition: goto.php:24
ui()
Definition: ui.php:5

References $DIC, ilPDSelectedItemsBlockViewGUI\bySettings(), and ui().

+ Here is the call graph for this function:

Member Function Documentation

◆ render()

ilFavouritesListGUI::render ( )

Render.

Returns
string

Definition at line 53 of file class.ilFavouritesListGUI.php.

54 {
55 $f = $this->ui->factory();
56 $item_groups = [];
58 foreach ($this->block_view->getItemGroups() as $group) {
59 $items = [];
60 foreach ($group->getItems() as $item) {
61 $items[] = $f->item()->standard(
62 $f->link()->standard($item["title"], ilLink::_getLink($item["ref_id"]))
63 )->withLeadIcon($f->symbol()->icon()->custom(ilObject::_getIcon($item["obj_id"]), $item["title"]));
64 }
65 if (count($items) > 0) {
66 $item_groups[] = $f->item()->group((string) $group->getLabel(), $items);
67 }
68 }
69 if (count($item_groups) > 0) {
70 $ctrl->setParameterByClass("ilPDSelectedItemsBlockGUI", "view", "0");
71 $ctrl->setParameterByClass("ilPDSelectedItemsBlockGUI", "col_side", "center");
72 $ctrl->setParameterByClass("ilPDSelectedItemsBlockGUI", "block_type", "pditems");
73 $panel = $f->panel()->secondary()->listing("", $item_groups);
74 $panel = $panel->withActions($f->dropdown()->standard([$f->link()->standard(
75 $this->lng->txt("rep_configure"),
76 $ctrl->getLinkTargetByClass(
77 ["ilDashboardGUI", "ilColumnGUI", "ilPDSelectedItemsBlockGUI"],
78 "manage"
79 )
80 )
81 ]));
82 return $this->ui->renderer()->render([$panel]);
83 } else {
84 $pdblock = new ilPDSelectedItemsBlockGUI();
85 return $pdblock->getNoItemFoundContent();
86 }
87 }
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
@ilCtrl_IsCalledBy ilPDSelectedItemsBlockGUI: ilColumnGUI @ilCtrl_Calls ilPDSelectedItemsBlockGUI: il...
if(isset($_FILES['img_file']) &&is_array($_FILES['img_file'])) $panel
Definition: imgupload.php:138

References $ctrl, Vendor\Package\$f, $panel, ilObject\_getIcon(), ilLink\_getLink(), and ui().

+ Here is the call graph for this function:

Field Documentation

◆ $block_view

ilFavouritesListGUI::$block_view
protected

Definition at line 15 of file class.ilFavouritesListGUI.php.

◆ $ctrl

ilFavouritesListGUI::$ctrl
protected

Definition at line 25 of file class.ilFavouritesListGUI.php.

Referenced by render().

◆ $ui

ilFavouritesListGUI::$ui
protected

Definition at line 20 of file class.ilFavouritesListGUI.php.


The documentation for this class was generated from the following file: