1 <?php declare(strict_types=1);
12 public function render(array $groupedItems,
bool $showHeader) : string
14 $itemRendered =
false;
16 foreach ($groupedItems as $group) {
19 foreach ($group->getItems() as $item) {
20 $itemListGUI = $this->listItemFactory->byType($item[
'type']);
24 $itemListGUI->enableCheckbox(
false);
25 if ($this->blockView->isInManageMode() && $this->blockView->mayRemoveItem((
int) $item[
'ref_id'])) {
26 $itemListGUI->enableCheckbox(
true);
29 $html = $itemListGUI->getListItemHTML(
39 'item_ref_id' => $item[
'ref_id'],
40 'item_obj_id' => $item[
'obj_id'],
41 'parent_ref' => $item[
'parent_ref'],
42 'type' => $item[
'type'],
43 'item_icon_image_type' => $itemListGUI->getIconImageType()
48 if (0 == count($itemHtml)) {
52 $this->addSectionHeader($group);
53 $this->resetRowType();
56 foreach ($itemHtml as $item) {
57 $this->addStandardRow(
59 (
int) $item[
'item_ref_id'],
60 (
int) $item[
'item_obj_id'],
61 $item[
'item_icon_image_type'],
62 'th_' . md5($group->getLabel())
73 if ($this->blockView->isInManageMode() && $this->blockView->supportsSelectAll()) {
75 $this->tpl->setCurrentBlock(
'select_all_row');
76 $this->tpl->setVariable(
'CHECKBOXNAME',
'ilToolbarSelectAll');
77 $this->tpl->setVariable(
'SEL_ALL_PARENT',
'ilToolbar');
78 $this->tpl->setVariable(
'SEL_ALL_CB_NAME',
'id');
79 $this->tpl->setVariable(
'TXT_SELECT_ALL', $this->lng->txt(
'select_all'));
80 $this->tpl->parseCurrentBlock();
83 return $this->tpl->get();
Interface ilPDObjectsRenderer.
Class ilPDSelectedItemsListRenderer.
Class ilPDBaseObjectsRenderer.
static addListGUIActivationProperty(ilObjectListGUI $a_list_gui, array &$a_item)
Get timing details for list gui.
render(array $groupedItems, bool $showHeader)