Render an item.
74 {
76 $ilAccess = $this->domain->access();
77 $ilCtrl = $this->gui->ctrl();
78
79
80
81
82
83
85 if ($item_group_list_presentation != "") {
86 $view_mode = ($item_group_list_presentation ===
"tile")
89 }
90
92 return $this->
renderCard($a_item_data, $a_position, $a_force_icon, $a_pos_prefix);
93 }
94
95 $item_list_gui = $this->
getItemGUI($a_item_data);
96 if (
$ilSetting->get(
"icon_position_in_lists") ===
"item_rows" ||
97 $a_item_data["type"] === "sess" || $a_force_icon) {
98 $item_list_gui->enableIcon(true);
99 }
100 if ($checkbox === self::CHECKBOX_ADMIN) {
101 $item_list_gui->enableCheckbox(true);
102 } elseif ($checkbox === self::CHECKBOX_DOWNLOAD) {
103
104 $item_list_gui->enableDownloadCheckbox((int) $a_item_data["ref_id"]);
105 }
106
107 if ($item_ordering) {
108 $item_list_gui->setPositionInputField(
109 $a_pos_prefix . "[" . $a_item_data["ref_id"] . "]",
110 sprintf('%d', $a_position * 10)
111 );
112 }
113
114 if ($a_item_data['type'] === 'sess') {
115 switch ($details_level) {
116 case \ilContainerContentGUI::DETAILS_TITLE:
118 $item_list_gui->enableExpand(true);
119 $item_list_gui->setExpanded(false);
120 $item_list_gui->enableDescription(false);
121 $item_list_gui->enableProperties(true);
122 break;
123
124 case \ilContainerContentGUI::DETAILS_ALL:
126 $item_list_gui->enableExpand(true);
127 $item_list_gui->setExpanded(true);
128 $item_list_gui->enableDescription(true);
129 $item_list_gui->enableProperties(true);
130 break;
131
132 case \ilContainerContentGUI::DETAILS_DEACTIVATED:
133 break;
134
135 default:
137 $item_list_gui->enableExpand(true);
138 $item_list_gui->enableDescription(true);
139 $item_list_gui->enableProperties(true);
140 break;
141 }
142 }
143
144 if ($this->item_modifier_closure instanceof \Closure) {
146 $c($item_list_gui, $a_item_data);
147 }
148
149
150 if ($a_item_data['type'] === 'sess' and (
152 $this->container_gui->isActiveAdministrationPanel() or
153 $this->container_gui->isActiveItemOrdering()
154 )
155 ) {
156 $pos = 1;
157
161
162 $item_readable = $ilAccess->checkAccess('read', '', (int) $a_item_data['ref_id']);
163
164 foreach ($items as $item) {
165
166
167 if (!$ilAccess->checkAccess('visible', '', (int) $item['ref_id'])) {
168 continue;
169 }
170
172 $item_list_gui2->enableIcon(true);
173 $item_list_gui2->enableItemDetailLinks(false);
174
175
176 $item_list_gui2->setParentRefId((int) ($a_item_data['ref_id'] ?? 0));
177
178
179 if (!$item_readable and !$ilAccess->checkAccess('write', '', $item['ref_id'])) {
180 $item_list_gui2->forceVisibleOnly(true);
181 }
182
183 if ($checkbox === self::CHECKBOX_ADMIN) {
184 $item_list_gui2->enableCheckbox(true);
185 } elseif ($checkbox === self::CHECKBOX_DOWNLOAD) {
186
187 $item_list_gui2->enableDownloadCheckbox((int) $item['ref_id']);
188 }
189
190 if ($this->container_gui->isActiveItemOrdering()) {
191 $item_list_gui2->setPositionInputField(
192 "[sess][" . $a_item_data['obj_id'] . "][" . $item["ref_id"] . "]",
193 sprintf('%d', $pos * 10)
194 );
195 $pos++;
196 }
197
198
200
201 $sub_item_html = $item_list_gui2->getListItemHTML(
202 (int) $item['ref_id'],
203 (int) $item['obj_id'],
204 $item['title'],
205 $item['description']
206 );
207
208 if (strlen($sub_item_html)) {
209 $item_list_gui->addSubItemHTML($sub_item_html);
210 }
211 }
212 }
213
214 $asynch = false;
215 $asynch_url = '';
217 $asynch = true;
218 $ilCtrl->setParameter($this->container_gui, "cmdrefid", $a_item_data['ref_id']);
219 $asynch_url = $ilCtrl->getLinkTarget(
220 $this->container_gui,
221 "getAsynchItemList",
222 "",
223 true,
224 false
225 );
226 $ilCtrl->setParameter($this->container_gui, "cmdrefid", "");
227 }
228
230
231 $html = $item_list_gui->getListItemHTML(
232 (int) $a_item_data['ref_id'],
233 (int) $a_item_data['obj_id'],
234 (string) $a_item_data['title'],
235 (string) $a_item_data['description'],
236 $asynch,
237 false,
238 $asynch_url
239 );
240
241 return $html;
242 }
renderCard(array $a_item_data, int $a_position=0, bool $a_force_icon=false, string $a_pos_prefix="")
Closure $item_modifier_closure
static _getInstance(int $a_obj_id)
static getCompleteDescriptions(array $objects)
overwrites description fields to long or short description in an assoc array keys needed (obj_id and ...
static getItemsByEvent(int $event_id)
Get session material / event items.
static addListGUIActivationProperty(ilObjectListGUI $list_gui, array &$item)
Get timing details for list gui.