ILIAS  trunk Revision v12.0_alpha-1221-g4e438232683
ilContainerRenderer Class Reference

Class ilContainerRenderer. More...

+ Collaboration diagram for ilContainerRenderer:

Public Member Functions

 setBlockPrefixClosure (Closure $f)
 
 setBlockPostfixClosure (Closure $f)
 
 setItemHiddenClosure (Closure $f)
 
 setItemModifierClosure (Closure $f)
 
 addTypeBlock (string $a_type, ?string $a_prefix=null, ?string $a_postfix=null)
 
 hasTypeBlock (string $a_type)
 
 addCustomBlock ( $a_id, string $a_caption, ?string $a_actions=null, array $a_data=[])
 Add custom block. More...
 
 hasCustomBlock ($a_id)
 Custom block already exists? More...
 
 isValidBlock ($a_id)
 Any block with id exists? More...
 
 hideItem ($a_id)
 Mark item id as used, but do not render. More...
 
 removeItem ($a_id)
 Remove item (from any block) More...
 
 hasItem ($a_id)
 Item with id exists? More...
 
 addItemToBlock ( $a_block_id, string $a_item_type, $a_item_id, $a_item_html, bool $a_force=false)
 Add item to existing block. More...
 
 addItemId ($a_item_id)
 
 addShowMoreButton ($a_block_id)
 Add show more button to a block. More...
 
 addDetailsLevel (int $a_level, string $a_url, bool $a_active=false)
 
 resetDetails ()
 
 setBlockPosition ( $a_block_id, int $a_pos)
 
 getHTML ()
 
 renderSingleTypeBlock (string $a_type, bool $exhausted=false)
 
 renderSingleCustomBlock ($a_id)
 
 renderDetails (ilTemplate $a_tpl)
 
 getItemRenderer ()
 Render Item Block Sequence. More...
 
 renderItemBlockSequence (ItemBlockSequence $sequence)
 
 renderSingleTypeBlockAsynch (ItemBlockSequence $sequence, string $block_id, array $already_rendered_items, int $block_limit)
 
 getBlockById (ItemBlockSequence $sequence, string $block_id,)
 

Protected Member Functions

 getViewMode ()
 
 processBlockPositions ()
 
 renderHelperCustomBlock (ilTemplate $a_block_tpl, $a_block_id, bool $a_is_single=false, bool $is_exhausted=false)
 
 renderHelperTypeBlock (ilTemplate $a_block_tpl, string $a_type, bool $a_is_single=false, bool $is_exhausted=false)
 
 getViewModeOfItemGroup (int $ref_id)
 
 getListPresentationOfItemGroup (int $ref_id)
 
 renderHelperGeneric (ilTemplate $a_block_tpl, $a_block_id, array $a_block, bool $a_is_single=false, bool $is_exhausted=false)
 
 initBlockTemplate ()
 
 addHeaderRow (ilTemplate $a_tpl, string $a_type="", string $a_text="", ?array $a_types_in_block=null, string $a_commands_html="", string $a_order_id="", array $a_data=[])
 Render block header. More...
 
 addStandardRow (ilTemplate $a_tpl, string $a_html, ?string $a_item_id=null)
 
 renderSelectAllBlock (ilTemplate $a_tpl)
 Render "select all". More...
 
 addSeparatorRow (ilTemplate $a_tpl)
 
 getDownloadableTypes ()
 Get downloadable repository object types. More...
 
 renderContainerPage ()
 
 getDetailsLevel (int $a_item_id)
 
 addItemGroupBlock (string $block_id, int $block_pos=0)
 replaces ilContainerContentGUI::renderItemGroup More...
 
 getBlockPrefix ($block_id)
 
 getBlockPostfix ($block_id)
 
 isItemHidden (string $block_id, int $ref_id)
 

Protected Attributes

const UNIQUE_SEPARATOR = "-"
 
ILIAS Container Content ItemManager $item_manager
 
ilAccessHandler $access
 
ilObjUser $user
 
ILIAS Containter Content ObjectiveRenderer $objective_renderer
 
ILIAS Containter Content ItemRenderer $item_renderer
 
ILIAS Container Content ItemPresentationManager $item_presentation
 
bool $admin_panel
 
ilLanguage $lng
 
ilSetting $settings
 
ilObjectDefinition $obj_definition
 
ilContainerGUI $container_gui
 
bool $enable_manage_select_all
 
bool $enable_multi_download
 
bool $active_block_ordering
 
array $type_blocks = []
 
array $custom_blocks = []
 
array $items = []
 
array $hidden_items = []
 
array $block_items = []
 
array $details = []
 
array $item_ids = []
 
array $rendered_blocks = []
 
int $bl_cnt = 0
 
array $block_pos = []
 
array $block_custom_pos = []
 
int $order_cnt = 0
 
array $show_more = []
 
int $view_mode
 
ILIAS DI UIServices $ui
 
ilCtrl $ctrl
 
Closure $block_prefix_closure = null
 
Closure $block_postfix_closure = null
 
Closure $item_hidden_closure = null
 
Closure $item_modifier_closure = null
 
ILIAS Container Content BlockSessionRepository $block_repo
 

Detailed Description

Member Function Documentation

◆ addCustomBlock()

ilContainerRenderer::addCustomBlock (   $a_id,
string  $a_caption,
?string  $a_actions = null,
array  $a_data = [] 
)

Add custom block.

Parameters
mixed$a_id

Definition at line 192 of file class.ilContainerRenderer.php.

197 : bool {
198 if (!$this->hasCustomBlock($a_id)) {
199 $this->custom_blocks[$a_id] = [
200 "caption" => $a_caption
201 ,"actions" => $a_actions
202 ,"data" => $a_data
203 ];
204 return true;
205 }
206 return false;
207 }
hasCustomBlock($a_id)
Custom block already exists?

◆ addDetailsLevel()

ilContainerRenderer::addDetailsLevel ( int  $a_level,
string  $a_url,
bool  $a_active = false 
)

Definition at line 349 of file class.ilContainerRenderer.php.

353 : void {
354 $this->details[$a_level] = [
355 "url" => $a_url
356 ,"active" => $a_active
357 ];
358 }

◆ addHeaderRow()

ilContainerRenderer::addHeaderRow ( ilTemplate  $a_tpl,
string  $a_type = "",
string  $a_text = "",
?array  $a_types_in_block = null,
string  $a_commands_html = "",
string  $a_order_id = "",
array  $a_data = [] 
)
protected

Render block header.

Parameters
string$a_order_iditem group id or type, e.g. "crs"
Exceptions
ilTemplateException

Definition at line 687 of file class.ilContainerRenderer.php.

695 : void {
698 $objDefinition = $this->obj_definition;
699
700 $a_tpl->setVariable("CB_ID", ' id="bl_cntr_' . (++$this->bl_cnt) . '"');
701
702 if ($this->enable_manage_select_all) {
703 $this->renderSelectAllBlock($a_tpl);
704 } elseif ($this->enable_multi_download) {
705 if ($a_type) {
706 $a_types_in_block = [$a_type];
707 }
708 foreach ($a_types_in_block as $type) {
709 if (in_array($type, $this->getDownloadableTypes(), true)) {
710 $this->renderSelectAllBlock($a_tpl);
711 break;
712 }
713 }
714 }
715
716 if ($a_text === "" && $a_type !== "") {
717 if (!$objDefinition->isPlugin($a_type)) {
718 $title = $lng->txt("objs_" . $a_type);
719 } else {
721 $title = $pl->txt("objs_" . $a_type);
722 }
723 } else {
724 $title = $a_text;
725 }
726
727 if (is_array($a_data)) {
728 foreach ($a_data as $k => $v) {
729 $a_tpl->setCurrentBlock("cb_data");
730 $a_tpl->setVariable("DATA_KEY", $k);
731 $a_tpl->setVariable("DATA_VALUE", $v);
732 $a_tpl->parseCurrentBlock();
733
734 if ($k === "behaviour" && $v == ilItemGroupBehaviour::EXPANDABLE_CLOSED) {
735 $a_tpl->touchBlock("container_items_hide");
736 }
737 }
738 }
739
740 if ($a_type !== "" && $ilSetting->get("icon_position_in_lists") !== "item_rows") {
741 $icon = ilUtil::getImagePath("standard/icon_" . $a_type . ".svg");
742
743 $a_tpl->setCurrentBlock("container_header_row_image");
744 $a_tpl->setVariable("HEADER_IMG", $icon);
745 $a_tpl->setVariable("HEADER_ALT", $title);
746 } else {
747 $a_tpl->setCurrentBlock("container_header_row");
748 }
749
750 if ($a_order_id !== "") {
751 /* blocks are ordered in page editor
752 $a_tpl->setVariable("BLOCK_HEADER_ORDER_NAME", "position[blocks][" . $a_order_id . "]");
753 $a_tpl->setVariable("BLOCK_HEADER_ORDER_NUM", (++$this->order_cnt) * 10);
754 */
755 }
756
757 $presentation_title = $title;
758 $sr_only = "";
759 if (trim($title) === "") {
760 $presentation_title = $this->lng->txt("cont_no_title");
761 $sr_only = "sr-only";
762 }
763 $a_tpl->setVariable("BLOCK_HEADER_CONTENT", $presentation_title);
764 $a_tpl->setVariable("SR_ONLY", $sr_only);
765 $a_tpl->setVariable("CHR_COMMANDS", $a_commands_html);
766 $a_tpl->parseCurrentBlock();
767 }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:544
getDownloadableTypes()
Get downloadable repository object types.
renderSelectAllBlock(ilTemplate $a_tpl)
Render "select all".
ilObjectDefinition $obj_definition
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static getPluginObjectByType(string $type)
Return either a repoObject plugin or a orgunit extension plugin or null if the type is not a plugin.
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
touchBlock(string $block)
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
global $ilSetting
Definition: privfeed.php:31

◆ addItemGroupBlock()

ilContainerRenderer::addItemGroupBlock ( string  $block_id,
int  $block_pos = 0 
)
protected

replaces ilContainerContentGUI::renderItemGroup

Definition at line 1136 of file class.ilContainerRenderer.php.

1136 : void
1137 {
1138 $item_data = $this->item_presentation->getRawDataByRefId((int) $block_id);
1139 $item_list_gui = $this->item_renderer->getItemGUI($item_data);
1140
1141 $perm_ok = true;
1142 /*
1143 $ilAccess = $this->access;
1144 $ilUser = $this->user;
1145
1146 // #16493
1147 $perm_ok = ($ilAccess->checkAccess("visible", "", $item_data['ref_id']) &&
1148 $ilAccess->checkAccess("read", "", $item_data['ref_id']));
1149
1150 $items = ilObjectActivation::getItemsByItemGroup($item_data['ref_id']);
1151
1152 // get all valid ids (this is filtered)
1153 $all_ids = array_map(static function (array $i) : int {
1154 return (int) $i["child"];
1155 }, $this->items["_all"]);
1156
1157 // remove filtered items
1158 $items = array_filter($items, static function (array $i) use ($all_ids) : bool {
1159 return in_array($i["ref_id"], $all_ids);
1160 });
1161
1162 // if no permission is given, set the items to "rendered" but
1163 // do not display the whole block
1164 if (!$perm_ok) {
1165 foreach ($items as $item) {
1166 $this->renderer->hideItem($item["child"]);
1167 }
1168 return;
1169 }
1170 */
1171
1172 $item_list_gui->enableNotes(false);
1173 $item_list_gui->enableTags(false);
1174 $item_list_gui->enableComments(false);
1175 $item_list_gui->enableTimings(false);
1176 $item_list_gui->initItem(
1177 (int) $item_data["ref_id"],
1178 (int) $item_data["obj_id"],
1179 "itgr",
1180 $item_data["title"],
1181 $item_data["description"]
1182 );
1183 $commands_html = $item_list_gui->getCommandsHTML();
1184
1185 // determine behaviour
1186 $item_group = new ilObjItemGroup($item_data["ref_id"]);
1187 $beh = $item_group->getBehaviour();
1188 $stored_val = $this->block_repo->getProperty(
1189 "itgr_" . $item_data["ref_id"],
1190 $this->user->getId(),
1191 "opened"
1192 );
1193 if ($stored_val !== "" && $beh !== ilItemGroupBehaviour::ALWAYS_OPEN) {
1194 $beh = ($stored_val === "1")
1197 }
1198
1199 $data = [
1200 "behaviour" => $beh,
1201 "store-url" => "./ilias.php?baseClass=ilcontainerblockpropertiesstoragegui&cmd=store" .
1202 "&cont_block_id=itgr_" . $item_data['ref_id']
1203 ];
1204 if (ilObjItemGroup::lookupHideTitle($item_data["obj_id"]) &&
1205 !$this->container_gui->isActiveAdministrationPanel()) {
1206 $this->addCustomBlock($block_id, "", $commands_html, $data);
1207 } else {
1208 $this->addCustomBlock($block_id, $item_data["title"], $commands_html, $data);
1209 }
1210 }
addCustomBlock( $a_id, string $a_caption, ?string $a_actions=null, array $a_data=[])
Add custom block.
Class ilObjItemGroup.
static lookupHideTitle(int $a_id)

References $data, ilItemGroupBehaviour\ALWAYS_OPEN, ilItemGroupBehaviour\EXPANDABLE_CLOSED, ilItemGroupBehaviour\EXPANDABLE_OPEN, ilObjItemGroup\lookupHideTitle(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ addItemId()

ilContainerRenderer::addItemId (   $a_item_id)
Parameters
mixed$a_item_id

Definition at line 335 of file class.ilContainerRenderer.php.

335 : void
336 {
337 $this->item_ids[$a_item_id] = true;
338 }

◆ addItemToBlock()

ilContainerRenderer::addItemToBlock (   $a_block_id,
string  $a_item_type,
  $a_item_id,
  $a_item_html,
bool  $a_force = false 
)

Add item to existing block.

Parameters
mixed$a_block_id
mixed$a_item_id
mixed$a_item_html

Definition at line 298 of file class.ilContainerRenderer.php.

304 : bool {
305 if ($a_item_type !== "itgr" &&
306 $this->isValidBlock($a_block_id) &&
307 (!$this->hasItem($a_item_id) || $a_force)) {
308 if (is_string($a_item_html) && trim($a_item_html) === "") {
309 return false;
310 }
311 if (!$a_item_html) {
312 return false;
313 }
314
315
316 // #16563 - item_id (== ref_id) is NOT unique, adding parent block id
317 $uniq_id = $a_block_id . self::UNIQUE_SEPARATOR . $a_item_id;
318
319 $this->items[$uniq_id] = [
320 "type" => $a_item_type
321 ,"html" => $a_item_html
322 ];
323
324 // #18326
325 $this->addItemId($a_item_id);
326 $this->block_items[$a_block_id][] = $uniq_id;
327 return true;
328 }
329 return false;
330 }
hasItem($a_id)
Item with id exists?
isValidBlock($a_id)
Any block with id exists?

◆ addSeparatorRow()

ilContainerRenderer::addSeparatorRow ( ilTemplate  $a_tpl)
protected

Definition at line 804 of file class.ilContainerRenderer.php.

804 : void
805 {
806 $a_tpl->setCurrentBlock("container_block");
807 $a_tpl->parseCurrentBlock();
808 }

References ilTemplate\parseCurrentBlock(), and ilTemplate\setCurrentBlock().

+ Here is the call graph for this function:

◆ addShowMoreButton()

ilContainerRenderer::addShowMoreButton (   $a_block_id)

Add show more button to a block.

Parameters
mixed$a_block_id

Definition at line 344 of file class.ilContainerRenderer.php.

344 : void
345 {
346 $this->show_more[] = $a_block_id;
347 }

◆ addStandardRow()

ilContainerRenderer::addStandardRow ( ilTemplate  $a_tpl,
string  $a_html,
?string  $a_item_id = null 
)
protected

Definition at line 769 of file class.ilContainerRenderer.php.

773 : void {
774 if ($a_item_id) {
775 $a_tpl->setCurrentBlock("row");
776 $a_tpl->setVariable("ROW_ID", 'id="item_row_' . $a_item_id . '"');
777 $a_tpl->parseCurrentBlock();
778 } else {
779 $a_tpl->touchBlock("row");
780 }
781
782 $a_tpl->setCurrentBlock("container_standard_row");
783 $a_tpl->setVariable("BLOCK_ROW_CONTENT", $a_html);
784 $a_tpl->parseCurrentBlock();
785
786 $a_tpl->touchBlock("container_row");
787 }

References ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), and HTML_Template_IT\setVariable().

+ Here is the call graph for this function:

◆ addTypeBlock()

ilContainerRenderer::addTypeBlock ( string  $a_type,
?string  $a_prefix = null,
?string  $a_postfix = null 
)

Definition at line 167 of file class.ilContainerRenderer.php.

171 : bool {
172 if ($a_type !== "itgr" &&
173 !$this->hasTypeBlock($a_type)) {
174 $this->type_blocks[$a_type] = [
175 "prefix" => $a_prefix
176 ,"postfix" => $a_postfix
177 ];
178 return true;
179 }
180 return false;
181 }

◆ getBlockById()

ilContainerRenderer::getBlockById ( ItemBlockSequence  $sequence,
string  $block_id 
)

Definition at line 1121 of file class.ilContainerRenderer.php.

1124 : ?ItemBlock {
1125 foreach ($sequence->getBlocks() as $block) {
1126 if ($block->getId() === $block_id) {
1127 return $block;
1128 }
1129 }
1130 return null;
1131 }

◆ getBlockPostfix()

ilContainerRenderer::getBlockPostfix (   $block_id)
protected

Definition at line 1221 of file class.ilContainerRenderer.php.

1221 : string
1222 {
1223 if ($this->block_postfix_closure instanceof Closure) {
1225 return (string) $c($block_id);
1226 }
1227 return "";
1228 }
$c
Definition: deliver.php:25

References $c.

◆ getBlockPrefix()

ilContainerRenderer::getBlockPrefix (   $block_id)
protected

Definition at line 1212 of file class.ilContainerRenderer.php.

1212 : string
1213 {
1214 if ($this->block_prefix_closure instanceof Closure) {
1216 return (string) $c($block_id);
1217 }
1218 return "";
1219 }

References $c.

◆ getDetailsLevel()

ilContainerRenderer::getDetailsLevel ( int  $a_item_id)
protected

Definition at line 843 of file class.ilContainerRenderer.php.

843 : int
844 {
845 if ($this->container_gui->isActiveAdministrationPanel()) {
847 }
848 if ($this->item_manager->getExpanded($a_item_id) !== null) {
849 return $this->item_manager->getExpanded($a_item_id);
850 }
851 /*if ($a_item_id === $this->force_details) {
852 return ilContainerContentGUI::DETAILS_ALL;
853 }*/
855 }

References ilContainerContentGUI\DETAILS_DEACTIVATED, and ilContainerContentGUI\DETAILS_TITLE.

◆ getDownloadableTypes()

ilContainerRenderer::getDownloadableTypes ( )
protected

Get downloadable repository object types.

Definition at line 813 of file class.ilContainerRenderer.php.

813 : array
814 {
815 return ["fold", "file"];
816 }

◆ getHTML()

ilContainerRenderer::getHTML ( )

Definition at line 382 of file class.ilContainerRenderer.php.

382 : string
383 {
384 $valid = false;
385
386 $block_tpl = $this->initBlockTemplate();
387
388 foreach ($this->processBlockPositions() as $block_id) {
389 if (array_key_exists($block_id, $this->custom_blocks) && $this->renderHelperCustomBlock(
390 $block_tpl,
391 $block_id
392 )) {
393 $this->addSeparatorRow($block_tpl);
394 $valid = true;
395 }
396 if (array_key_exists($block_id, $this->type_blocks) && $this->renderHelperTypeBlock(
397 $block_tpl,
398 $block_id
399 )) {
400 $this->addSeparatorRow($block_tpl);
401 $valid = true;
402 }
403 }
404
405 if ($valid) {
406 $this->renderDetails($block_tpl);
407
408 return $block_tpl->get();
409 }
410 return "";
411 }
renderHelperTypeBlock(ilTemplate $a_block_tpl, string $a_type, bool $a_is_single=false, bool $is_exhausted=false)
renderHelperCustomBlock(ilTemplate $a_block_tpl, $a_block_id, bool $a_is_single=false, bool $is_exhausted=false)
addSeparatorRow(ilTemplate $a_tpl)
renderDetails(ilTemplate $a_tpl)
$valid

References $valid.

◆ getItemRenderer()

ilContainerRenderer::getItemRenderer ( )

Render Item Block Sequence.

Definition at line 833 of file class.ilContainerRenderer.php.

◆ getListPresentationOfItemGroup()

ilContainerRenderer::getListPresentationOfItemGroup ( int  $ref_id)
protected

Definition at line 528 of file class.ilContainerRenderer.php.

528 : string
529 {
530 $item_group = new ilObjItemGroup($ref_id);
531 return $item_group->getListPresentation();
532 }
$ref_id
Definition: ltiauth.php:66

References $ref_id.

◆ getViewMode()

ilContainerRenderer::getViewMode ( )
protected

Definition at line 158 of file class.ilContainerRenderer.php.

158 : int
159 {
160 return $this->view_mode;
161 }

References $view_mode.

◆ getViewModeOfItemGroup()

ilContainerRenderer::getViewModeOfItemGroup ( int  $ref_id)
protected

Definition at line 516 of file class.ilContainerRenderer.php.

516 : int
517 {
518 $item_group = new ilObjItemGroup($ref_id);
520 if ($item_group->getListPresentation() !== "") {
521 $view_mode = ($item_group->getListPresentation() === "tile")
524 }
525 return $view_mode;
526 }

References $ref_id, ilContainerContentGUI\VIEW_MODE_LIST, and ilContainerContentGUI\VIEW_MODE_TILE.

◆ hasCustomBlock()

ilContainerRenderer::hasCustomBlock (   $a_id)

Custom block already exists?

Parameters
mixed$a_id

Definition at line 213 of file class.ilContainerRenderer.php.

213 : bool
214 {
215 return array_key_exists($a_id, $this->custom_blocks);
216 }

◆ hasItem()

ilContainerRenderer::hasItem (   $a_id)

Item with id exists?

Parameters
mixed$a_id

Definition at line 285 of file class.ilContainerRenderer.php.

285 : bool
286 {
287 return (array_key_exists($a_id, $this->item_ids) ||
288 array_key_exists($a_id, $this->hidden_items));
289 }

◆ hasTypeBlock()

ilContainerRenderer::hasTypeBlock ( string  $a_type)

Definition at line 183 of file class.ilContainerRenderer.php.

183 : bool
184 {
185 return array_key_exists($a_type, $this->type_blocks);
186 }

◆ hideItem()

ilContainerRenderer::hideItem (   $a_id)

Mark item id as used, but do not render.

Parameters
mixed$a_id

Definition at line 238 of file class.ilContainerRenderer.php.

238 : void
239 {
240 // see hasItem();
241 $this->hidden_items[$a_id] = true;
242
243 // #16629 - do not remove hidden items from other blocks
244 // $this->removeItem($a_id);
245 }

◆ initBlockTemplate()

ilContainerRenderer::initBlockTemplate ( )
protected

Definition at line 677 of file class.ilContainerRenderer.php.

677 : ilTemplate
678 {
679 return new ilTemplate("tpl.container_list_block.html", true, true, "components/ILIAS/Container");
680 }
special template class to simplify handling of ITX/PEAR

◆ isItemHidden()

ilContainerRenderer::isItemHidden ( string  $block_id,
int  $ref_id 
)
protected

Definition at line 1230 of file class.ilContainerRenderer.php.

1230 : bool
1231 {
1232 if ($this->item_hidden_closure instanceof Closure) {
1234 return (bool) $c($block_id, $ref_id);
1235 }
1236 return false;
1237 }

References $c, and $ref_id.

◆ isValidBlock()

ilContainerRenderer::isValidBlock (   $a_id)

Any block with id exists?

Parameters
mixed$a_id

Definition at line 222 of file class.ilContainerRenderer.php.

222 : bool
223 {
224 return ($this->hasTypeBlock($a_id) ||
225 $this->hasCustomBlock($a_id));
226 }

◆ processBlockPositions()

ilContainerRenderer::processBlockPositions ( )
protected

Definition at line 440 of file class.ilContainerRenderer.php.

440 : array
441 {
442 // manual order
443 if (is_array($this->block_custom_pos) && count($this->block_custom_pos)) {
444 $tmp = $this->block_pos;
445 $this->block_pos = [];
446 foreach ($this->block_custom_pos as $idx => $block_id) {
447 if ($this->isValidBlock($block_id)) {
448 $this->block_pos[$block_id] = $idx;
449 }
450 }
451
452 // at least some manual are valid
453 if (count($this->block_pos)) {
454 // append missing blocks from default order
455 $last = max($this->block_pos);
456 foreach (array_keys($tmp) as $block_id) {
457 if (!array_key_exists($block_id, $this->block_pos)) {
458 $this->block_pos[$block_id] = ++$last;
459 }
460 }
461 }
462 // all manual invalid, use default
463 else {
464 $this->block_pos = $tmp;
465 }
466 }
467
468 // add missing blocks to order
469 $last = count($this->block_pos)
470 ? max($this->block_pos)
471 : 0;
472 foreach (array_keys($this->custom_blocks) as $block_id) {
473 if (!array_key_exists($block_id, $this->block_pos)) {
474 $this->block_pos[$block_id] = ++$last;
475 }
476 }
477 foreach (array_keys($this->type_blocks) as $block_id) {
478 if (!array_key_exists($block_id, $this->block_pos)) {
479 $this->block_pos[$block_id] = ++$last;
480 }
481 }
482
483 asort($this->block_pos);
484 return array_keys($this->block_pos);
485 }

◆ removeItem()

ilContainerRenderer::removeItem (   $a_id)

Remove item (from any block)

Parameters
mixed$a_id

Definition at line 251 of file class.ilContainerRenderer.php.

251 : void
252 {
253 if (!$this->hasItem($a_id)) {
254 return;
255 }
256
257 unset($this->item_ids[$a_id], $this->hidden_items[$a_id]);
258
259 foreach (array_keys($this->items) as $item_id) {
260 $parts = explode(self::UNIQUE_SEPARATOR, $item_id);
261 if (array_pop($parts) == $a_id) {
262 unset($this->items[$item_id]);
263 }
264 }
265
266 foreach ($this->block_items as $block_id => $items) {
267 foreach ($items as $idx => $item_id) {
268 $parts = explode(self::UNIQUE_SEPARATOR, $item_id);
269 if (array_pop($parts) == $a_id) {
270 unset($this->block_items[$block_id][$idx]);
271 if (!count($this->block_items[$block_id])) {
272 unset($this->block_items[$block_id]);
273 }
274 break;
275 }
276 }
277 }
278 }
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:61

References $parts.

◆ renderContainerPage()

ilContainerRenderer::renderContainerPage ( )
protected

Definition at line 838 of file class.ilContainerRenderer.php.

838 : string
839 {
840 return $this->container_gui->getContainerPageHTML();
841 }

◆ renderDetails()

ilContainerRenderer::renderDetails ( ilTemplate  $a_tpl)

Definition at line 818 of file class.ilContainerRenderer.php.

818 : void
819 {
821
822 if (count($this->details)) {
823 $a_tpl->setCurrentBlock('container_details_row');
824 $a_tpl->setVariable('TXT_DETAILS', $lng->txt('details'));
825 $a_tpl->parseCurrentBlock();
826 }
827 }

References $lng, ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), and HTML_Template_IT\setVariable().

+ Here is the call graph for this function:

◆ renderHelperCustomBlock()

ilContainerRenderer::renderHelperCustomBlock ( ilTemplate  $a_block_tpl,
  $a_block_id,
bool  $a_is_single = false,
bool  $is_exhausted = false 
)
protected
Parameters
mixed$a_block_id

Definition at line 490 of file class.ilContainerRenderer.php.

495 : bool {
496 if ($this->hasCustomBlock($a_block_id)) {
497 return $this->renderHelperGeneric($a_block_tpl, $a_block_id, $this->custom_blocks[$a_block_id], $a_is_single, $is_exhausted);
498 }
499 return false;
500 }
renderHelperGeneric(ilTemplate $a_block_tpl, $a_block_id, array $a_block, bool $a_is_single=false, bool $is_exhausted=false)

◆ renderHelperGeneric()

ilContainerRenderer::renderHelperGeneric ( ilTemplate  $a_block_tpl,
  $a_block_id,
array  $a_block,
bool  $a_is_single = false,
bool  $is_exhausted = false 
)
protected
Parameters
mixed$a_block_id

Definition at line 537 of file class.ilContainerRenderer.php.

543 : bool {
545 if (!in_array($a_block_id, $this->rendered_blocks)) {
546 $this->rendered_blocks[] = $a_block_id;
547 $block_types = [];
548 if (isset($this->block_items[$a_block_id]) && is_array($this->block_items[$a_block_id])) {
549 foreach ($this->block_items[$a_block_id] as $item_id) {
550 if (isset($this->items[$item_id]["type"])) {
551 $block_types[] = $this->items[$item_id]["type"];
552 }
553 }
554 }
555
556 // determine view mode and tile size
557 $tile_size = ilContainer::TILE_SMALL;
558 $view_mode = $this->getViewMode();
560 $tile_size = ilContainer::_lookupContainerSetting($this->container_gui->getObject()->getId(), "tile_size");
561 }
562 if (is_numeric($a_block_id)) {
563 $item_group = new ilObjItemGroup($a_block_id);
564 if ($item_group->getListPresentation() !== "") {
565 $view_mode = ($item_group->getListPresentation() === "tile" && !$this->active_block_ordering && !$this->admin_panel)
568 $tile_size = $item_group->getTileSize();
569 }
570 }
571
572
573 // #14610 - manage empty item groups
574 if ((isset($this->block_items[$a_block_id]) && is_array($this->block_items[$a_block_id])) ||
575 is_numeric($a_block_id)) {
576 $cards = [];
577
578 $order_id = (!$a_is_single && $this->active_block_ordering)
579 ? $a_block_id
580 : "";
581 $this->addHeaderRow(
582 $a_block_tpl,
583 $a_block["type"] ?? '',
584 $a_block["caption"] ?? '',
585 array_unique($block_types),
586 $a_block["actions"] ?? '',
587 $order_id,
588 $a_block["data"] ?? []
589 );
590
592 if (isset($a_block["prefix"]) && $a_block["prefix"]) {
593 $this->addStandardRow($a_block_tpl, $a_block["prefix"]);
594 }
595 }
596
597 if (isset($this->block_items[$a_block_id])) {
598 foreach ($this->block_items[$a_block_id] as $item_id) {
600 $this->addStandardRow($a_block_tpl, $this->items[$item_id]["html"], $item_id);
601 } else {
602 $cards[] = $this->items[$item_id]["html"];
603 }
604 }
605 }
606
608 if (isset($a_block["postfix"]) && $a_block["postfix"]) {
609 $this->addStandardRow($a_block_tpl, $a_block["postfix"]);
610 }
611 }
612
614 $f = $this->ui->factory();
615 $renderer = $this->ui->renderer();
616
617 //Create a deck with large cards
618 switch ($tile_size) {
620 $deck = $f->deck($cards)->withSmallCardsSize();
621 break;
622
624 $deck = $f->deck($cards)->withLargeCardsSize();
625 break;
626
628 $deck = $f->deck($cards)->withExtraLargeCardsSize();
629 break;
630
632 $deck = $f->deck($cards)->withFullSizedCardsSize();
633 break;
634
635 default:
636 $deck = $f->deck($cards)->withNormalCardsSize();
637 break;
638 }
639
640 $html = $renderer->render($deck);
641 $a_block_tpl->setCurrentBlock("tile_rows");
642 $a_block_tpl->setVariable("TILE_ROWS", $html);
643 $a_block_tpl->parseCurrentBlock();
644 }
645 // show more
646 if ($is_exhausted) {
647 $a_block_tpl->setCurrentBlock("show_more");
648
649 $ctrl->setParameter($this->container_gui, "type", $a_block_id);
650 $url = $ctrl->getLinkTarget($this->container_gui, "renderBlockAsynch", "", true);
651 $ctrl->setParameter($this->container_gui, "type", "");
652
653 $f = $this->ui->factory();
654 $renderer = $this->ui->renderer();
655 $button = $f->button()->standard($this->lng->txt("cont_show_more"), "")
656 ->withLoadingAnimationOnClick(true)
657 ->withOnLoadCode(function ($id) use ($a_block_id, $url) {
658 return "il.Container.initShowMore('$id', '$a_block_id', '" . $url . "');";
659 });
660 if ($ctrl->isAsynch()) {
661 $a_block_tpl->setVariable("SHOW_MORE_BUTTON", $renderer->renderAsync($button));
662 } else {
663 $a_block_tpl->setVariable("SHOW_MORE_BUTTON", $renderer->render($button));
664 }
665 $a_block_tpl->parseCurrentBlock();
666 $a_block_tpl->setCurrentBlock("show_more");
667 $a_block_tpl->parseCurrentBlock();
668 }
669
670 return true;
671 }
672 }
673
674 return false;
675 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
$renderer
addHeaderRow(ilTemplate $a_tpl, string $a_type="", string $a_text="", ?array $a_types_in_block=null, string $a_commands_html="", string $a_order_id="", array $a_data=[])
Render block header.
addStandardRow(ilTemplate $a_tpl, string $a_html, ?string $a_item_id=null)
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
getLinkTarget(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc
isAsynch()
@inheritDoc
$url
Definition: shib_logout.php:70

References Vendor\Package\$f, $id, $renderer, $url, ilContainer\_lookupContainerSetting(), ILIAS\Repository\lng(), ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), ilContainer\TILE_EXTRA_LARGE, ilContainer\TILE_FULL, ilContainer\TILE_LARGE, ilContainer\TILE_SMALL, ILIAS\Repository\ui(), ilContainerContentGUI\VIEW_MODE_LIST, and ilContainerContentGUI\VIEW_MODE_TILE.

+ Here is the call graph for this function:

◆ renderHelperTypeBlock()

ilContainerRenderer::renderHelperTypeBlock ( ilTemplate  $a_block_tpl,
string  $a_type,
bool  $a_is_single = false,
bool  $is_exhausted = false 
)
protected

Definition at line 502 of file class.ilContainerRenderer.php.

507 : bool {
508 if ($this->hasTypeBlock($a_type)) {
509 $block = $this->type_blocks[$a_type];
510 $block["type"] = $a_type;
511 return $this->renderHelperGeneric($a_block_tpl, $a_type, $block, $a_is_single, $is_exhausted);
512 }
513 return false;
514 }

◆ renderItemBlockSequence()

ilContainerRenderer::renderItemBlockSequence ( ItemBlockSequence  $sequence)

Definition at line 857 of file class.ilContainerRenderer.php.

859 : string {
860 $valid = false;
861
862 $page_html = $this->renderContainerPage();
863 $block_tpl = $this->initBlockTemplate();
864
866 foreach ($this->item_presentation->getAllRefIds() as $ref_id) {
867 $rd = $this->item_presentation->getRawDataByRefId($ref_id);
868 $preloader->addItem($rd["obj_id"], $rd["type"], $ref_id);
869 if ($rd["type"] === "sess") {
870 $ev_items = ilObjectActivation::getItemsByEvent((int) $rd["obj_id"]);
871 foreach ($ev_items as $ev_item) {
872 $preloader->addItem((int) $ev_item["obj_id"], $ev_item["type"], $ev_item["ref_id"]);
873 }
874 }
875 }
876 $preloader->preload();
877
878 $embedded_block_ids = $this->item_presentation->getPageEmbeddedBlockIds();
879 foreach ($sequence->getBlocks() as $block) {
880 $block_id = "";
881 $force_item_even_if_already_rendered = false;
882 if ($block->getBlock() instanceof \ILIAS\Container\Content\ItemGroupBlock) {
883 $block_id = (string) $block->getBlock()->getRefId();
884 $force_item_even_if_already_rendered = true;
885 }
886 if ($block->getBlock() instanceof \ILIAS\Container\Content\TypeBlock) {
887 $block_id = $block->getBlock()->getType();
888 if ($block->getPageEmbedded()) {
889 $force_item_even_if_already_rendered = true;
890 }
891 }
892 if ($block->getBlock() instanceof \ILIAS\Container\Content\SessionBlock) {
893 $block_id = "sess";
894 }
895 if ($block->getBlock() instanceof \ILIAS\Container\Content\OtherBlock) {
896 $block_id = "_other";
897 }
898 if ($block->getBlock() instanceof \ILIAS\Container\Content\ObjectivesBlock) {
899 $block_id = "_lobj";
900 }
901
902 $position = 1;
903 $pos_prefix = "";
904
905 // (1) add block
906 if ($block->getBlock() instanceof \ILIAS\Container\Content\ItemGroupBlock) {
907 $this->addItemGroupBlock($block_id);
908 $pos_prefix = "[itgr][" . \ilObject::_lookupObjId($block->getBlock()->getRefId()) . "]";
909 }
910 if ($block->getBlock() instanceof \ILIAS\Container\Content\OtherBlock) {
911 $title = $this->item_presentation->filteredSubtree()
912 ? $this->lng->txt("cont_found_objects")
913 : $this->lng->txt("content");
914 $this->addCustomBlock($block_id, $title);
915 }
916 if ($block->getBlock() instanceof \ILIAS\Container\Content\TypeBlock ||
917 $block->getBlock() instanceof \ILIAS\Container\Content\SessionBlock) {
918 $this->addTypeBlock(
919 $block_id,
920 $this->getBlockPrefix($block_id),
921 $this->getBlockPostfix($block_id)
922 );
923 }
924
925 // (2) render and add items
926 foreach ($block->getItemRefIds() as $ref_id) {
927 if ($this->isItemHidden($block_id, $ref_id)) {
928 continue;
929 }
930 if (!$this->access->checkAccess('visible', '', $ref_id)) {
931 continue;
932 }
933
934 $item_data = $this->item_presentation->getRawDataByRefId($ref_id);
935 if ($item_data === null) {
936 continue;
937 }
939 if ($this->container_gui->isActiveAdministrationPanel()) {
941 } elseif ($this->container_gui->isMultiDownloadEnabled()) {
943 }
944 $item_group_list_presentation = "";
945 if ($block->getBlock() instanceof \ILIAS\Container\Content\ItemGroupBlock) {
946 if ($this->getListPresentationOfItemGroup((int) $block_id) === "tile") {
947 if (!$this->admin_panel && !$this->active_block_ordering) {
948 $item_group_list_presentation = "tile";
949 }
950 }
951 if ($this->getListPresentationOfItemGroup((int) $block_id) === "list") {
952 if (!$this->admin_panel && !$this->active_block_ordering) {
953 $item_group_list_presentation = "list";
954 }
955 }
956 }
957 $html = $this->item_renderer->renderItem(
958 $item_data,
959 $position++,
960 false,
961 $pos_prefix,
962 $item_group_list_presentation,
963 $checkbox,
964 $this->item_presentation->isActiveItemOrdering($item_data["type"]),
965 $this->getDetailsLevel($item_data["obj_id"])
966 );
967 if ($html != "") {
968 $this->addItemToBlock(
969 $block_id,
970 $item_data["type"],
971 $item_data["child"],
972 $html,
973 $force_item_even_if_already_rendered
974 );
975 }
976 }
977
978 // (3) render blocks
979 if ($block->getPageEmbedded()) {
980 if ($block->getBlock() instanceof \ILIAS\Container\Content\TypeBlock ||
981 $block->getBlock() instanceof \ILIAS\Container\Content\SessionBlock) {
982 $page_html = preg_replace(
983 '~\[list-' . $block->getId() . '\]~i',
984 $this->renderSingleTypeBlock($block->getId(), $block->getLimitExhausted()),
985 $page_html
986 );
987 $valid = true;
988 } elseif ($block->getBlock() instanceof \ILIAS\Container\Content\ItemGroupBlock) {
989 $page_html = preg_replace(
990 '~\[item-group-' . $block->getId() . '\]~i',
991 $this->renderSingleCustomBlock((int) $block->getId()),
992 $page_html
993 );
994 $valid = true;
995 } elseif ($block->getBlock() instanceof \ILIAS\Container\Content\OtherBlock) {
996 $page_html = preg_replace(
997 '~\[list-_other\]~i',
998 $this->renderSingleCustomBlock($block->getId()),
999 $page_html
1000 );
1001 $valid = true;
1002 } elseif ($block->getBlock() instanceof \ILIAS\Container\Content\ObjectivesBlock) {
1003 $page_html = preg_replace(
1004 '~\[list-_lobj\]~i',
1005 $this->objective_renderer->renderObjectives(),
1006 $page_html
1007 );
1008 $valid = true;
1009 }
1010 } else {
1011 if ($block->getBlock() instanceof \ILIAS\Container\Content\ItemGroupBlock ||
1012 $block->getBlock() instanceof \ILIAS\Container\Content\OtherBlock) {
1013 if ($this->renderHelperCustomBlock($block_tpl, $block_id, false, $block->getLimitExhausted())) {
1014 $this->addSeparatorRow($block_tpl);
1015 $valid = true;
1016 }
1017 }
1018 if ($block->getBlock() instanceof \ILIAS\Container\Content\TypeBlock ||
1019 $block->getBlock() instanceof \ILIAS\Container\Content\SessionBlock) {
1020 if ($this->renderHelperTypeBlock($block_tpl, $block_id, false, $block->getLimitExhausted())) {
1021 $this->addSeparatorRow($block_tpl);
1022 $valid = true;
1023 }
1024 }
1025 if ($block->getBlock() instanceof \ILIAS\Container\Content\ObjectivesBlock) {
1026 $this->objective_renderer->renderObjectives();
1027 $block_tpl->setVariable(
1028 "CONTENT",
1029 $this->objective_renderer->getContent()
1030 );
1031 $this->addSeparatorRow($block_tpl);
1032 $valid = true;
1033 }
1034 }
1035 }
1036
1037 // remove embedded, but unrendered blocks
1038 foreach ($this->item_presentation->getPageEmbeddedBlockIds() as $id) {
1039 if (is_numeric($id)) {
1040 $page_html = preg_replace(
1041 '~\[item-group-' . $id . '\]~i',
1042 "",
1043 $page_html
1044 );
1045 } else {
1046 $page_html = preg_replace(
1047 '~\[list-' . $id . '\]~i',
1048 "",
1049 $page_html
1050 );
1051 }
1052 }
1053
1054 if ($valid) {
1055 $this->renderDetails($block_tpl);
1056 return $page_html . $block_tpl->get();
1057 }
1058 return $page_html;
1059 }
addTypeBlock(string $a_type, ?string $a_prefix=null, ?string $a_postfix=null)
addItemGroupBlock(string $block_id, int $block_pos=0)
replaces ilContainerContentGUI::renderItemGroup
addItemToBlock( $a_block_id, string $a_item_type, $a_item_id, $a_item_html, bool $a_force=false)
Add item to existing block.
isItemHidden(string $block_id, int $ref_id)
static getItemsByEvent(int $event_id)
Get session material / event items.
Preloader for object list GUIs.
static _lookupObjId(int $ref_id)
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.

◆ renderSelectAllBlock()

ilContainerRenderer::renderSelectAllBlock ( ilTemplate  $a_tpl)
protected

Render "select all".

Definition at line 792 of file class.ilContainerRenderer.php.

792 : void
793 {
795
796 $a_tpl->setCurrentBlock("select_all_row");
797 $a_tpl->setVariable("CHECKBOXNAME", "bl_cb_" . $this->bl_cnt);
798 $a_tpl->setVariable("SEL_ALL_PARENT", "bl_cntr_" . $this->bl_cnt);
799 $a_tpl->setVariable("SEL_ALL_PARENT", "bl_cntr_" . $this->bl_cnt);
800 $a_tpl->setVariable("TXT_SELECT_ALL", $lng->txt("select_all"));
801 $a_tpl->parseCurrentBlock();
802 }

References $lng, ilTemplate\parseCurrentBlock(), ilTemplate\setCurrentBlock(), and HTML_Template_IT\setVariable().

+ Here is the call graph for this function:

◆ renderSingleCustomBlock()

ilContainerRenderer::renderSingleCustomBlock (   $a_id)
Parameters
mixed$a_id

Definition at line 425 of file class.ilContainerRenderer.php.

425 : string
426 {
427 $block_tpl = $this->initBlockTemplate();
428
429 if ($this->renderHelperCustomBlock($block_tpl, $a_id, true)) {
430 return $block_tpl->get();
431 }
432 return "";
433 }

◆ renderSingleTypeBlock()

ilContainerRenderer::renderSingleTypeBlock ( string  $a_type,
bool  $exhausted = false 
)

Definition at line 413 of file class.ilContainerRenderer.php.

413 : string
414 {
415 $block_tpl = $this->initBlockTemplate();
416 if ($this->renderHelperTypeBlock($block_tpl, $a_type, true, $exhausted)) {
417 return $block_tpl->get();
418 }
419 return "";
420 }

◆ renderSingleTypeBlockAsynch()

ilContainerRenderer::renderSingleTypeBlockAsynch ( ItemBlockSequence  $sequence,
string  $block_id,
array  $already_rendered_items,
int  $block_limit 
)

Definition at line 1061 of file class.ilContainerRenderer.php.

1066 : string {
1067
1068 $block = $this->getBlockById($sequence, $block_id);
1069 // get all sub items
1070 //$this->items = $this->getContainerObject()->getSubItems(
1071 // $this->getContainerGUI()->isActiveAdministrationPanel()
1072 //);
1073 $exhausted = false;
1074 $ref_ids = $already_rendered_items;
1075
1076 // iterate all types
1077 if (!is_null($block) && count($block->getItemRefIds()) > 0) {
1078
1079 $this->addTypeBlock($block_id);
1080 //$this->renderer->setBlockPosition($type, ++$pos);
1081
1082 $position = 1;
1083 $counter = 1;
1084 foreach ($block->getItemRefIds() as $item_ref_id) {
1085 $item_data = $this->item_presentation->getRawDataByRefId($item_ref_id);
1086 if (in_array($item_ref_id, $ref_ids)) {
1087 continue;
1088 }
1089
1091 if ($this->container_gui->isActiveAdministrationPanel()) {
1093 } elseif ($this->container_gui->isMultiDownloadEnabled()) {
1095 }
1096 if (!$this->hasItem($item_ref_id)) {
1097 $html = $this->item_renderer->renderItem(
1098 $item_data,
1099 $position++,
1100 false,
1101 "",
1102 "",
1103 $checkbox,
1104 $this->item_presentation->isActiveItemOrdering($item_data["type"]),
1105 );
1106 if ($html != "") {
1107 $this->addItemToBlock($block_id, $item_data["type"], $item_ref_id, $html);
1108 }
1109 }
1110
1111 if ($block_limit > 0 && $html != "" && $block->getLimitExhausted()) {
1112 $this->addShowMoreButton($block_id);
1113 $exhausted = true;
1114 }
1115 }
1116 }
1117
1118 return $this->renderSingleTypeBlock($block_id, $exhausted);
1119 }
renderSingleTypeBlock(string $a_type, bool $exhausted=false)
addShowMoreButton($a_block_id)
Add show more button to a block.
getBlockById(ItemBlockSequence $sequence, string $block_id,)
$counter

References $counter, ILIAS\Containter\Content\ItemRenderer\CHECKBOX_ADMIN, ILIAS\Containter\Content\ItemRenderer\CHECKBOX_DOWNLOAD, and ILIAS\Containter\Content\ItemRenderer\CHECKBOX_NONE.

◆ resetDetails()

ilContainerRenderer::resetDetails ( )

Definition at line 360 of file class.ilContainerRenderer.php.

360 : void
361 {
362 $this->details = [];
363 }

◆ setBlockPosition()

ilContainerRenderer::setBlockPosition (   $a_block_id,
int  $a_pos 
)
Parameters
mixed$a_block_id

Definition at line 373 of file class.ilContainerRenderer.php.

376 : void {
377 if ($this->isValidBlock($a_block_id)) {
378 $this->block_pos[$a_block_id] = $a_pos;
379 }
380 }

◆ setBlockPostfixClosure()

ilContainerRenderer::setBlockPostfixClosure ( Closure  $f)

Definition at line 142 of file class.ilContainerRenderer.php.

142 : void
143 {
144 $this->block_postfix_closure = $f;
145 }

References Vendor\Package\$f.

◆ setBlockPrefixClosure()

ilContainerRenderer::setBlockPrefixClosure ( Closure  $f)

Definition at line 137 of file class.ilContainerRenderer.php.

137 : void
138 {
139 $this->block_prefix_closure = $f;
140 }

References Vendor\Package\$f.

◆ setItemHiddenClosure()

ilContainerRenderer::setItemHiddenClosure ( Closure  $f)

Definition at line 147 of file class.ilContainerRenderer.php.

147 : void
148 {
149 $this->item_hidden_closure = $f;
150 }

References Vendor\Package\$f.

◆ setItemModifierClosure()

ilContainerRenderer::setItemModifierClosure ( Closure  $f)

Definition at line 152 of file class.ilContainerRenderer.php.

152 : void
153 {
154 $this->item_renderer->setItemModifierClosure($f);
155 $this->item_modifier_closure = $f;
156 }

References Vendor\Package\$f.

Field Documentation

◆ $access

ilAccessHandler ilContainerRenderer::$access
protected

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

◆ $active_block_ordering

bool ilContainerRenderer::$active_block_ordering
protected

Definition at line 46 of file class.ilContainerRenderer.php.

◆ $admin_panel

bool ilContainerRenderer::$admin_panel
protected

Definition at line 36 of file class.ilContainerRenderer.php.

◆ $bl_cnt

int ilContainerRenderer::$bl_cnt = 0
protected

Definition at line 59 of file class.ilContainerRenderer.php.

◆ $block_custom_pos

array ilContainerRenderer::$block_custom_pos = []
protected

Definition at line 63 of file class.ilContainerRenderer.php.

◆ $block_items

array ilContainerRenderer::$block_items = []
protected

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

◆ $block_pos

array ilContainerRenderer::$block_pos = []
protected

Definition at line 62 of file class.ilContainerRenderer.php.

◆ $block_postfix_closure

Closure ilContainerRenderer::$block_postfix_closure = null
protected

Definition at line 71 of file class.ilContainerRenderer.php.

◆ $block_prefix_closure

Closure ilContainerRenderer::$block_prefix_closure = null
protected

Definition at line 70 of file class.ilContainerRenderer.php.

◆ $block_repo

ILIAS Container Content BlockSessionRepository ilContainerRenderer::$block_repo
protected

Definition at line 74 of file class.ilContainerRenderer.php.

◆ $container_gui

ilContainerGUI ilContainerRenderer::$container_gui
protected

Definition at line 41 of file class.ilContainerRenderer.php.

◆ $ctrl

ilCtrl ilContainerRenderer::$ctrl
protected

Definition at line 69 of file class.ilContainerRenderer.php.

◆ $custom_blocks

array ilContainerRenderer::$custom_blocks = []
protected

Definition at line 50 of file class.ilContainerRenderer.php.

◆ $details

array ilContainerRenderer::$details = []
protected

Definition at line 54 of file class.ilContainerRenderer.php.

◆ $enable_manage_select_all

bool ilContainerRenderer::$enable_manage_select_all
protected

Definition at line 44 of file class.ilContainerRenderer.php.

◆ $enable_multi_download

bool ilContainerRenderer::$enable_multi_download
protected

Definition at line 45 of file class.ilContainerRenderer.php.

◆ $hidden_items

array ilContainerRenderer::$hidden_items = []
protected

Definition at line 52 of file class.ilContainerRenderer.php.

◆ $item_hidden_closure

Closure ilContainerRenderer::$item_hidden_closure = null
protected

Definition at line 72 of file class.ilContainerRenderer.php.

◆ $item_ids

array ilContainerRenderer::$item_ids = []
protected

Definition at line 55 of file class.ilContainerRenderer.php.

◆ $item_manager

ILIAS Container Content ItemManager ilContainerRenderer::$item_manager
protected

Definition at line 30 of file class.ilContainerRenderer.php.

◆ $item_modifier_closure

Closure ilContainerRenderer::$item_modifier_closure = null
protected

Definition at line 73 of file class.ilContainerRenderer.php.

◆ $item_presentation

ILIAS Container Content ItemPresentationManager ilContainerRenderer::$item_presentation
protected

Definition at line 35 of file class.ilContainerRenderer.php.

◆ $item_renderer

ILIAS Containter Content ItemRenderer ilContainerRenderer::$item_renderer
protected

Definition at line 34 of file class.ilContainerRenderer.php.

◆ $items

array ilContainerRenderer::$items = []
protected

Definition at line 51 of file class.ilContainerRenderer.php.

◆ $lng

ilLanguage ilContainerRenderer::$lng
protected

Definition at line 38 of file class.ilContainerRenderer.php.

◆ $obj_definition

ilObjectDefinition ilContainerRenderer::$obj_definition
protected

Definition at line 40 of file class.ilContainerRenderer.php.

◆ $objective_renderer

ILIAS Containter Content ObjectiveRenderer ilContainerRenderer::$objective_renderer
protected

Definition at line 33 of file class.ilContainerRenderer.php.

◆ $order_cnt

int ilContainerRenderer::$order_cnt = 0
protected

Definition at line 64 of file class.ilContainerRenderer.php.

◆ $rendered_blocks

array ilContainerRenderer::$rendered_blocks = []
protected

Definition at line 58 of file class.ilContainerRenderer.php.

◆ $settings

ilSetting ilContainerRenderer::$settings
protected

Definition at line 39 of file class.ilContainerRenderer.php.

◆ $show_more

array ilContainerRenderer::$show_more = []
protected

Definition at line 66 of file class.ilContainerRenderer.php.

◆ $type_blocks

array ilContainerRenderer::$type_blocks = []
protected

Definition at line 49 of file class.ilContainerRenderer.php.

◆ $ui

ILIAS DI UIServices ilContainerRenderer::$ui
protected

Definition at line 68 of file class.ilContainerRenderer.php.

◆ $user

ilObjUser ilContainerRenderer::$user
protected

Definition at line 32 of file class.ilContainerRenderer.php.

◆ $view_mode

int ilContainerRenderer::$view_mode
protected

Definition at line 67 of file class.ilContainerRenderer.php.

Referenced by getViewMode().

◆ UNIQUE_SEPARATOR

const ilContainerRenderer::UNIQUE_SEPARATOR = "-"
protected

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


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