ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilFavouritesListGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilFavouritesListGUI:

Public Member Functions

 __construct (?ilObjUser $user=null)
 
 render ()
 

Protected Attributes

ilPDSelectedItemsBlockViewGUI $block_view
 
ILIAS DI UIServices $ui
 
ilCtrl $ctrl
 
ilLanguage $lng
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Favourites UI

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

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

Constructor & Destructor Documentation

◆ __construct()

ilFavouritesListGUI::__construct ( ?ilObjUser  $user = null)

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

References $DIC, ILIAS\LTI\ToolProvider\$settings, ilPDSelectedItemsBlockViewGUI\bySettings(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\ui().

32  {
33  global $DIC;
34 
35  if (is_null($user)) {
36  $user = $DIC->user();
37  }
38 
40  $settings->parse();
42  $this->ui = $DIC->ui();
43  $this->ctrl = $DIC->ctrl();
44  $this->lng = $DIC->language();
45  $this->lng->loadLanguageModule("rep");
46  }
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200
global $DIC
Definition: feed.php:28
static bySettings(ilPDSelectedItemsBlockViewSettings $viewSettings)
+ Here is the call graph for this function:

Member Function Documentation

◆ render()

ilFavouritesListGUI::render ( )

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

References $ctrl, Vendor\Package\$f, $panel, ilObject\_getIcon(), ilLink\_getLink(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilCtrl\setParameterByClass(), and ILIAS\Repository\ui().

48  : string
49  {
50  $f = $this->ui->factory();
51  $item_groups = [];
53  foreach ($this->block_view->getItemGroups() as $group) {
54  $items = [];
55  foreach ($group->getItems() as $item) {
56  $items[] = $f->item()->standard(
57  $f->link()->standard($item["title"], ilLink::_getLink($item["ref_id"]))
58  )->withLeadIcon($f->symbol()->icon()->custom(ilObject::_getIcon((int) $item["obj_id"]), $item["title"]));
59  }
60  if (count($items) > 0) {
61  $item_groups[] = $f->item()->group($group->getLabel(), $items);
62  }
63  }
64  if (count($item_groups) > 0) {
65  $ctrl->setParameterByClass("ilPDSelectedItemsBlockGUI", "view", "0");
66  $ctrl->setParameterByClass("ilPDSelectedItemsBlockGUI", "col_side", "center");
67  $ctrl->setParameterByClass("ilPDSelectedItemsBlockGUI", "block_type", "pditems");
68 
69  // see PR discussion at https://github.com/ILIAS-eLearning/ILIAS/pull/5247/files
70  $config_item = $f->item()->standard(
71  $f->link()->standard(
72  $this->lng->txt("rep_configure"),
73  $this->ctrl->getLinkTargetByClass(["ilDashboardGUI", "ilColumnGUI", "ilPDSelectedItemsBlockGUI"], "manage")
74  )
75  );
76  array_unshift($item_groups, $f->item()->group($this->lng->txt(""), [$config_item]));
77  $panel = $f->panel()->secondary()->listing("", $item_groups);
78  return $this->ui->renderer()->render([$panel]);
79  }
80 
81  $pdblock = new ilPDSelectedItemsBlockGUI();
82  return $pdblock->getNoItemFoundContent();
83  }
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
if(isset($_FILES['img_file']) &&is_array($_FILES['img_file'])) $panel
Definition: imgupload.php:198
setParameterByClass(string $a_class, string $a_parameter, $a_value)
ilPDSelectedItemsBlockGUI: ilColumnGUI ilPDSelectedItemsBlockGUI: ilCommonActionDispatcherGUI ...
+ Here is the call graph for this function:

Field Documentation

◆ $block_view

ilPDSelectedItemsBlockViewGUI ilFavouritesListGUI::$block_view
protected

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

◆ $ctrl

ilCtrl ilFavouritesListGUI::$ctrl
protected

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

Referenced by render().

◆ $lng

ilLanguage ilFavouritesListGUI::$lng
protected

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

◆ $ui

ILIAS DI UIServices ilFavouritesListGUI::$ui
protected

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


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