19 declare(strict_types=1);
67 bool $a_force_icon =
false,
68 string $a_pos_prefix =
"",
69 string $item_group_list_presentation =
"",
70 int $checkbox = self::CHECKBOX_NONE,
71 bool $item_ordering =
false,
75 $ilAccess = $this->domain->access();
76 $ilCtrl = $this->gui->ctrl();
84 if ($item_group_list_presentation !=
"") {
85 $view_mode = ($item_group_list_presentation ===
"tile")
91 return $this->
renderCard($a_item_data, $a_position, $a_force_icon, $a_pos_prefix);
94 $item_list_gui = $this->
getItemGUI($a_item_data);
95 if (
$ilSetting->get(
"icon_position_in_lists") ===
"item_rows" ||
96 $a_item_data[
"type"] ===
"sess" || $a_force_icon) {
97 $item_list_gui->enableIcon(
true);
99 if ($checkbox === self::CHECKBOX_ADMIN) {
100 $item_list_gui->enableCheckbox(
true);
101 } elseif ($checkbox === self::CHECKBOX_DOWNLOAD) {
103 $item_list_gui->enableDownloadCheckbox((
int) $a_item_data[
"ref_id"]);
106 if ($item_ordering && $a_item_data[
'type'] !==
'sess') {
107 $item_list_gui->setPositionInputField(
108 $a_pos_prefix .
"[" . $a_item_data[
"ref_id"] .
"]",
109 sprintf(
'%d', $a_position * 10)
113 if ($a_item_data[
'type'] ===
'sess') {
114 switch ($details_level) {
115 case \ilContainerContentGUI::DETAILS_TITLE:
117 $item_list_gui->enableExpand(
true);
118 $item_list_gui->setExpanded(
false);
119 $item_list_gui->enableDescription(
false);
120 $item_list_gui->enableProperties(
true);
123 case \ilContainerContentGUI::DETAILS_ALL:
125 $item_list_gui->enableExpand(
true);
126 $item_list_gui->setExpanded(
true);
127 $item_list_gui->enableDescription(
true);
128 $item_list_gui->enableProperties(
true);
131 case \ilContainerContentGUI::DETAILS_DEACTIVATED:
136 $item_list_gui->enableExpand(
true);
137 $item_list_gui->enableDescription(
true);
138 $item_list_gui->enableProperties(
true);
143 if (method_exists($this,
"addItemDetails")) {
144 $this->addItemDetails($item_list_gui, $a_item_data);
148 if ($a_item_data[
'type'] ===
'sess' and (
150 $this->container_gui->isActiveAdministrationPanel() or
151 $this->container_gui->isActiveItemOrdering()
160 $item_readable = $ilAccess->checkAccess(
'read',
'', (
int) $a_item_data[
'ref_id']);
162 foreach ($items as $item) {
165 if (!$ilAccess->checkAccess(
'visible',
'', (
int) $item[
'ref_id'])) {
170 $item_list_gui2->enableIcon(
true);
171 $item_list_gui2->enableItemDetailLinks(
false);
174 $item_list_gui2->setParentRefId((
int) ($a_item_data[
'ref_id'] ?? 0));
177 if (!$item_readable and !$ilAccess->checkAccess(
'write',
'', $item[
'ref_id'])) {
178 $item_list_gui2->forceVisibleOnly(
true);
181 if ($checkbox === self::CHECKBOX_ADMIN) {
182 $item_list_gui2->enableCheckbox(
true);
183 } elseif ($checkbox === self::CHECKBOX_DOWNLOAD) {
185 $item_list_gui2->enableDownloadCheckbox((
int) $item[
'ref_id']);
188 if ($this->container_gui->isActiveItemOrdering()) {
189 $item_list_gui2->setPositionInputField(
190 "[sess][" . $a_item_data[
'obj_id'] .
"][" . $item[
"ref_id"] .
"]",
191 sprintf(
'%d', $pos * 10)
199 $sub_item_html = $item_list_gui2->getListItemHTML(
200 (
int) $item[
'ref_id'],
201 (
int) $item[
'obj_id'],
206 if (strlen($sub_item_html)) {
207 $item_list_gui->addSubItemHTML($sub_item_html);
216 $ilCtrl->setParameter($this->container_gui,
"cmdrefid", $a_item_data[
'ref_id']);
217 $asynch_url = $ilCtrl->getLinkTarget(
218 $this->container_gui,
224 $ilCtrl->setParameter($this->container_gui,
"cmdrefid",
"");
229 $html = $item_list_gui->getListItemHTML(
230 (
int) $a_item_data[
'ref_id'],
231 (
int) $a_item_data[
'obj_id'],
232 (
string) $a_item_data[
'title'],
233 (
string) $a_item_data[
'description'],
245 bool $a_force_icon =
false,
246 string $a_pos_prefix =
"" 248 $item_list_gui = $this->
getItemGUI($a_item_data);
251 (
int) $a_item_data[
'ref_id'],
252 $a_item_data[
'type'],
253 (
int) $a_item_data[
'obj_id']
255 $item_list_gui->initItem(
256 (
int) $a_item_data[
'ref_id'],
257 (
int) $a_item_data[
'obj_id'],
258 $a_item_data[
'type'],
259 $a_item_data[
'title'],
260 $a_item_data[
'description']
263 return $item_list_gui->getAsCard(
264 (
int) $a_item_data[
'ref_id'],
265 (
int) $a_item_data[
'obj_id'],
266 (
string) $a_item_data[
'type'],
267 (
string) $a_item_data[
'title'],
268 (
string) $a_item_data[
'description']
275 if (!isset($this->list_gui[$item_data[
"type"]])) {
277 $item_list_gui->setContainerObject($this->container_gui);
278 $this->list_gui[$item_data[
"type"]] = $item_list_gui;
280 $item_list_gui = $this->list_gui[$item_data[
"type"]];
284 $item_list_gui->setParentRefId((
int) ($item_data[
"parent"] ?? 0));
286 $item_list_gui->setDefaultCommandParameters(array());
287 $item_list_gui->disableTitleLink(
false);
288 $item_list_gui->resetConditionTarget();
290 if ($this->container->isClassificationFilterActive()) {
291 $item_list_gui->enablePath(
293 $this->container->getRefId(),
294 new \ilSessionClassificationPathGUI()
307 $item_list_gui->enableComments(
true);
308 $item_list_gui->enableNotes(
true);
309 $item_list_gui->enableTags(
true);
310 $item_list_gui->enableRating(
true);
313 $item_list_gui->forceVisibleOnly(
false);
316 $this->container_gui->modifyItemGUI($item_list_gui, $item_data);
318 return $item_list_gui;
ilContainerGUI $container_gui
static getItemsByEvent(int $event_id)
Get session material / event items.
Interface Observer Contains several chained tasks and infos about them.
getItemGUI(array $item_data)
renderItem(array $a_item_data, int $a_position=0, bool $a_force_icon=false, string $a_pos_prefix="", string $item_group_list_presentation="", int $checkbox=self::CHECKBOX_NONE, bool $item_ordering=false, int $details_level=\ilObjectListGUI::DETAILS_ALL)
Render an item.
static buildAjaxHash(int $node_type, ?int $node_id, string $obj_type, int $obj_id, ?string $sub_type=null, ?int $sub_id=null, int $news_id=0)
Build ajax hash.
__construct()
Constructor setup ILIAS global object public.
static addListGUIActivationProperty(ilObjectListGUI $list_gui, array &$item)
Get timing details for list gui.
static _getListGUIByType(string $type, int $context=ilObjectListGUI::CONTEXT_REPOSITORY)
renderCard(array $a_item_data, int $a_position=0, bool $a_force_icon=false, string $a_pos_prefix="")
static _getInstance(int $a_obj_id)
Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder...
InternalDomainService $domain
static getCompleteDescriptions(array $objects)
overwrites description fields to long or short description in an assoc array keys needed (obj_id and ...