77 $this->tpl =
$DIC[
"tpl"];
78 $this->
ctrl = $DIC->ctrl();
79 $this->
user = $DIC->user();
80 $this->
lng = $DIC->language();
81 $this->
access = $DIC->access();
82 $this->db =
$DIC->database();
83 $this->rbacsystem =
$DIC->rbac()->system();
85 $this->obj_definition =
$DIC[
"objDefinition"];
88 $this->container_gui = $container_gui_obj;
91 $this->container_obj = $obj;
98 $this->view_mode = (
ilContainer::_lookupContainerSetting($this->container_obj->getId(),
"list_presentation") ===
"tile" && !$this->container_gui->isActiveAdministrationPanel() && !$this->container_gui->isActiveOrdering())
99 ? self::VIEW_MODE_TILE
100 : self::VIEW_MODE_LIST;
102 $this->clipboard =
$DIC
107 $this->request =
$DIC
112 $this->item_manager =
$DIC
117 ->items($this->container_obj);
118 $this->block_repo =
$DIC
157 if ($ilCtrl->getNextClass() ===
"ilcolumngui" &&
158 $ilCtrl->isAsynch()) {
181 if ($ilCtrl->getNextClass() !==
"ilcolumngui" ||
182 !$ilCtrl->isAsynch()) {
205 if ($ilCtrl->getNextClass() ===
"ilcolumngui" &&
208 $html = $ilCtrl->forwardCommand($column_gui);
210 if (!$ilCtrl->isAsynch()) {
215 "components/ILIAS/Container",
217 [
"container_content_gui" => $this]
219 if (!$uip->replaced()) {
220 $html = $ilCtrl->getHTML($column_gui);
222 $html = $uip->getHTML($html);
235 $ilCtrl->saveParameterByClass(
"ilcolumngui",
"col_return");
238 $ilCtrl->getLinkTarget($this->container_gui,
"redrawListItem",
"",
true) .
"');");
241 $ilCtrl->getLinkTargetByClass(
242 [get_class($this->container_gui),
"ilcommonactiondispatchergui",
"ilratinggui"],
249 switch ($ilCtrl->getNextClass()) {
251 $this->container_gui->setSideColumnReturn();
256 $ilDB->useSlave(
true);
258 $ilDB->useSlave(
false);
274 "tpl.container_page.html",
277 "components/ILIAS/Container"
280 if (!$this->item_presentation->hasItems() &&
282 $ilAccess->checkAccess(
"write",
"", $this->getContainerObject()->getRefId())) {
285 $html = $this->renderItemList();
300 $this->item_presentation,
301 ($this->
getContainerGUI()->isActiveAdministrationPanel() && !$this->clipboard->hasEntries()),
302 $this->getContainerGUI()->isMultiDownloadEnabled(),
303 $this->getContainerGUI()->isActiveOrdering() && (get_class($this) !==
"ilContainerObjectiveGUI")
305 $sorting->getBlockPositions(),
306 $this->container_gui,
307 $this->getViewMode(),
308 $this->getContainerGUI()->isActiveAdministrationPanel()
314 foreach ($event_items as $ev) {
333 if (!$ilCtrl->isAsynch()) {
339 $html = $ilCtrl->forwardCommand($column_gui);
345 $html = $ilCtrl->forwardCommand($column_gui);
358 if (!isset($this->list_gui[$item_data[
"type"]])) {
361 $this->list_gui[$item_data[
"type"]] = &$item_list_gui;
363 $item_list_gui = &$this->list_gui[$item_data[
"type"]];
367 $item_list_gui->setParentRefId((
int) ($item_data[
"parent"] ?? 0));
369 $item_list_gui->setDefaultCommandParameters([]);
370 $item_list_gui->disableTitleLink(
false);
371 $item_list_gui->resetConditionTarget();
373 if ($this->container_obj->isClassificationFilterActive()) {
374 $item_list_gui->enablePath(
376 $this->container_obj->getRefId(),
382 $item_list_gui->enableComments(
true);
383 $item_list_gui->enableNotes(
true);
384 $item_list_gui->enableTags(
true);
385 $item_list_gui->enableRating(
true);
388 $item_list_gui->forceVisibleOnly(
false);
393 return $item_list_gui;
400 string $a_container_page_html
407 if (is_int(strpos($a_container_page_html,
"[list-" . $type .
"]"))) {
413 while (preg_match(
'~\[(item-group-([0-9]*))\]~i', $a_container_page_html, $found)) {
417 $a_container_page_html = preg_replace(
'~\[' . $found[1] .
'\]~i', $html, $a_container_page_html);
430 $this->embedded_block[$block_type][] = $block_parameter;
435 return $this->embedded_block;
441 if (isset($this->embedded_block[
"itgr"]) && is_array($this->embedded_block[
"itgr"])) {
443 if (isset($this->items[
"itgr"]) && is_array($this->items[
"itgr"])) {
444 foreach ($this->items[
"itgr"] as $ig) {
445 $item_groups[$ig[
"ref_id"]] = $ig;
449 foreach ($this->embedded_block[
"itgr"] as
$ref_id) {
450 if (isset($item_groups[
$ref_id])) {
451 $this->renderItemGroup($item_groups[
$ref_id]);
457 if (isset($this->embedded_block[
"type"]) && is_array($this->embedded_block[
"type"])) {
458 foreach ($this->embedded_block[
"type"] as $type) {
459 if (isset($this->items[$type]) && is_array($this->items[$type]) && $this->
renderer->addTypeBlock($type)) {
460 if ($this->hasForcedOrderByStartDate($type)) {
466 foreach ($this->items[$type] as $item_data) {
467 if (!$this->
renderer->hasItem($item_data[
"child"])) {
468 $html = $this->renderItem($item_data, $position++);
470 $this->
renderer->addItemToBlock($type, $item_data[
"type"], $item_data[
"child"], $html);
481 return $type ===
'sess' && get_class($this) === ilContainerSessionsContentGUI::class;
486 $item_list_gui = $this->getItemGUI($a_item_data);
487 return $item_list_gui->getUniqueItemId();
493 bool $a_force_icon =
false,
494 string $a_pos_prefix =
"",
495 string $item_group_list_presentation =
""
498 $ilAccess = $this->access;
499 $ilCtrl = $this->ctrl;
501 if (!$ilAccess->checkAccess(
'visible',
'', $a_item_data[
'ref_id'], $a_item_data[
'type'], $a_item_data[
'obj_id'], $a_item_data[
'tree'])) {
505 $view_mode = $this->getViewMode();
506 if ($item_group_list_presentation !=
"") {
507 $view_mode = ($item_group_list_presentation ===
"tile")
508 ? self::VIEW_MODE_TILE
509 : self::VIEW_MODE_LIST;
511 if ($view_mode === self::VIEW_MODE_TILE) {
512 return $this->renderCard($a_item_data, $a_position, $a_force_icon, $a_pos_prefix);
515 $item_list_gui = $this->getItemGUI($a_item_data);
516 if ($a_item_data[
"type"] ===
"sess" ||
518 $ilSetting->get(
"icon_position_in_lists") ===
"item_rows") {
519 $item_list_gui->enableIcon(
true);
522 if ($this->getContainerGUI()->isActiveAdministrationPanel() && !$this->clipboard->hasEntries()) {
523 $item_list_gui->enableCheckbox(
true);
524 } elseif ($this->getContainerGUI()->isMultiDownloadEnabled()) {
526 $item_list_gui->enableDownloadCheckbox((
int) $a_item_data[
"ref_id"]);
529 if ($this->getContainerGUI()->isActiveItemOrdering() && !$this->hasForcedOrderByStartDate($a_item_data[
'type'])) {
530 $item_list_gui->setPositionInputField(
531 $a_pos_prefix .
"[" . $a_item_data[
"ref_id"] .
"]",
532 sprintf(
'%d', $a_position * 10)
536 if ($a_item_data[
'type'] ===
'sess' && get_class($this) !==
'ilContainerObjectiveGUI') {
537 switch ($this->getDetailsLevel($a_item_data[
'obj_id'])) {
538 case self::DETAILS_TITLE:
540 $item_list_gui->enableExpand(
true);
541 $item_list_gui->setExpanded(
false);
542 $item_list_gui->enableDescription(
false);
543 $item_list_gui->enableProperties(
true);
546 case self::DETAILS_ALL:
548 $item_list_gui->enableExpand(
true);
549 $item_list_gui->setExpanded(
true);
550 $item_list_gui->enableDescription(
true);
551 $item_list_gui->enableProperties(
true);
556 $item_list_gui->enableExpand(
true);
557 $item_list_gui->enableDescription(
true);
558 $item_list_gui->enableProperties(
true);
563 if (method_exists($this,
"addItemDetails")) {
564 $this->addItemDetails($item_list_gui, $a_item_data);
568 if ($a_item_data[
'type'] ===
'sess' && (
569 $this->getDetailsLevel($a_item_data[
'obj_id']) !== self::DETAILS_TITLE ||
570 $this->getContainerGUI()->isActiveAdministrationPanel() ||
571 $this->getContainerGUI()->isActiveItemOrdering()
578 $item_readable = $ilAccess->checkAccess(
'read',
'', $a_item_data[
'ref_id']);
580 foreach ($items as $item) {
583 if (!$ilAccess->checkAccess(
'visible',
'', $item[
'ref_id'])) {
587 $item_list_gui2 = $this->getItemGUI($item);
588 $item_list_gui2->enableIcon(
true);
589 $item_list_gui2->enableItemDetailLinks(
false);
592 $item_list_gui2->setParentRefId((
int) ($a_item_data[
'ref_id'] ?? 0));
595 if (!$item_readable && !$ilAccess->checkAccess(
'write',
'', $item[
'ref_id'])) {
596 $item_list_gui2->forceVisibleOnly(
true);
599 if ($this->getContainerGUI()->isActiveAdministrationPanel() && !$this->clipboard->hasEntries()) {
600 $item_list_gui2->enableCheckbox(
true);
601 } elseif ($this->getContainerGUI()->isMultiDownloadEnabled()) {
603 $item_list_gui2->enableDownloadCheckbox((
int) $item[
'ref_id']);
606 if ($this->getContainerGUI()->isActiveItemOrdering()) {
607 $item_list_gui2->setPositionInputField(
608 "[sess][" . $a_item_data[
'obj_id'] .
"][" . $item[
"ref_id"] .
"]",
609 sprintf(
'%d', $pos * 10)
617 $sub_item_html = $item_list_gui2->getListItemHTML(
624 $this->determineAdminCommands($item[
"ref_id"], $item_list_gui2->adminCommandsIncluded());
625 if ($sub_item_html !==
'') {
626 $item_list_gui->addSubItemHTML($sub_item_html);
633 $html = $item_list_gui->getListItemHTML(
634 (
int) $a_item_data[
'ref_id'],
635 (
int) $a_item_data[
'obj_id'],
636 (
string) $a_item_data[
'title'],
637 (
string) $a_item_data[
'description'],
645 bool $a_force_icon =
false,
646 string $a_pos_prefix =
""
648 $item_list_gui = $this->getItemGUI($a_item_data);
651 $a_item_data[
'ref_id'],
652 $a_item_data[
'type'],
653 (
int) $a_item_data[
'obj_id']
655 $item_list_gui->initItem(
656 (
int) $a_item_data[
'ref_id'],
657 (
int) $a_item_data[
'obj_id'],
658 (
string) $a_item_data[
'type'],
659 (
string) $a_item_data[
'title'],
660 (
string) $a_item_data[
'description']
663 return $item_list_gui->getAsCard(
664 $a_item_data[
'ref_id'],
665 (
int) $a_item_data[
'obj_id'],
666 (
string) $a_item_data[
'type'],
667 (
string) $a_item_data[
'title'],
668 (
string) $a_item_data[
'description']
677 $this->determinePageEmbeddedBlocks($a_output_html);
678 $this->renderPageEmbeddedBlocks();
681 foreach ($this->getGroupedObjTypes() as $type => $v) {
683 if (is_int(strpos($a_output_html,
"[list-" . $type .
"]"))) {
684 $a_output_html = preg_replace(
685 '~\[list-' . $type .
'\]~i',
686 $this->
renderer->renderSingleTypeBlock($type),
693 while (preg_match(
'~\[(item-group-([0-9]*))\]~i', $a_output_html, $found)) {
694 $itgr_ref_id = (
int) $found[2];
696 $a_output_html = preg_replace(
697 '~\[' . $found[1] .
'\]~i',
698 $this->
renderer->renderSingleCustomBlock($itgr_ref_id),
703 return $a_output_html;
712 $this->initRenderer();
714 $this->items = $this->getContainerObject()->getSubItems(
715 $this->getContainerGUI()->isActiveAdministrationPanel()
719 $ref_ids = $this->request->getAlreadyRenderedRefIds();
722 if (is_array($this->items[$type]) &&
723 $this->
renderer->addTypeBlock($type)) {
728 foreach ($this->items[$type] as $item_data) {
729 $item_ref_id = $item_data[
"child"];
731 if (in_array($item_ref_id, $ref_ids)) {
734 if ($this->block_limit > 0 &&
$counter == $this->block_limit + 1) {
735 if (
$counter == $this->block_limit + 1) {
737 $this->
renderer->addShowMoreButton($type);
743 if (!$this->
renderer->hasItem($item_ref_id)) {
744 $html = $this->renderItem($item_data, $position++);
748 $this->
renderer->addItemToBlock($type, $item_data[
"type"], $item_ref_id, $html);
754 return $this->
renderer->renderSingleTypeBlock($type, $exhausted);
762 $objDefinition = $this->obj_definition;
764 if (empty($this->type_grps)) {
766 $objDefinition::getGroupedRepositoryObjectTypes($this->getContainerObject()->getType());
768 return $this->type_grps;
775 $lng->loadLanguageModule(
"rep");
777 $tpl =
new ilTemplate(
"tpl.rep_intro.html",
true,
true,
"components/ILIAS/Repository");
792 if (isset($this->items[
"itgr"]) && is_array($this->items[
"itgr"])) {
793 foreach ($this->items[
"itgr"] as $itgr) {
794 if (!$this->
renderer->hasCustomBlock($itgr[
"child"])) {
795 $this->renderItemGroup($itgr);
797 $this->
renderer->setBlockPosition($itgr[
"ref_id"], ++$a_pos);
806 $ilAccess = $this->access;
807 $ilUser = $this->user;
809 $perm_ok = ($ilAccess->checkAccess(
"visible",
"", $a_itgr[
'ref_id']) &&
810 $ilAccess->checkAccess(
"read",
"", $a_itgr[
'ref_id']));
815 $all_ids = array_map(
static function (array $i):
int {
816 return (
int) $i[
"child"];
817 }, $this->items[
"_all"]);
820 $items = array_filter($items,
static function (array $i) use ($all_ids):
bool {
821 return in_array($i[
"ref_id"], $all_ids);
827 foreach ($items as $item) {
828 $this->
renderer->hideItem($item[
"child"]);
833 $item_list_gui = $this->getItemGUI($a_itgr);
834 $item_list_gui->enableNotes(
false);
835 $item_list_gui->enableTags(
false);
836 $item_list_gui->enableComments(
false);
837 $item_list_gui->enableTimings(
false);
838 $item_list_gui->getListItemHTML(
842 $a_itgr[
"description"]
844 $commands_html = $item_list_gui->getCommandsHTML($a_itgr[
"title"],
false);
848 $beh = $item_group->getBehaviour();
849 $stored_val = $this->block_repo->getProperty(
850 "itgr_" . $a_itgr[
"ref_id"],
855 $beh = ($stored_val ===
"1")
862 "store-url" =>
"./ilias.php?baseClass=ilcontainerblockpropertiesstoragegui&cmd=store" .
863 "&cont_block_id=itgr_" . $a_itgr[
'ref_id']
866 !$this->getContainerGUI()->isActiveAdministrationPanel()) {
867 $this->
renderer->addCustomBlock($a_itgr[
"ref_id"],
"", $commands_html,
$data);
869 $this->
renderer->addCustomBlock($a_itgr[
"ref_id"], $a_itgr[
"title"], $commands_html,
$data);
876 $this->getContainerObject()->
getId()
877 )->sortSubItems(
'itgr', $a_itgr[
'obj_id'], $items);
883 foreach ($items as $item) {
886 $it_pres = $item_group->getListPresentation();
887 if ($this->getContainerGUI()->isActiveOrdering() ||
888 $this->getContainerGUI()->isActiveAdministrationPanel()) {
892 $html2 = $this->renderItem($item, $position++,
false,
"[itgr][" . $a_itgr[
'obj_id'] .
"]", $it_pres);
895 $this->
renderer->addItemToBlock($a_itgr[
"ref_id"], $item[
"type"], $item[
"child"], $html2,
true);
Manages items in repository clipboard.
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
static _recordReadEvent(string $a_type, int $a_ref_id, int $obj_id, int $usr_id, $a_ext_rc=null, $a_ext_time=null)
Column user interface class.
static getCmdSide()
Get Column Side of Current Command.
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.
Parent class of all container content GUIs.
renderItem(array $a_item_data, int $a_position=0, bool $a_force_icon=false, string $a_pos_prefix="", string $item_group_list_presentation="")
initRenderer()
Init container renderer.
renderItemGroup(array $a_itgr)
insertPageEmbeddedBlocks(string $a_output_html)
Insert blocks into container page.
addEmbeddedBlock(string $block_type, $block_parameter)
Add embedded block.
determinePageEmbeddedBlocks(string $a_container_page_html)
Determine all blocks that are embedded in the container page.
setOutput()
This method sets the output of the right and main column in the global standard template.
ilContainer $container_obj
getUniqueItemId(array $a_item_data)
forwardToColumnGUI()
Get columngui output.
getGroupedObjTypes()
Get grouped repository object types.
BlockSessionRepository $block_repo
ilContainerRenderer $renderer
getMainContent()
Get content HTML for main column, this one may be overwritten in derived classes.
renderPageEmbeddedBlocks()
hasForcedOrderByStartDate(string $type)
StandardGUIRequest $request
ILIAS Container Content ItemPresentationManager $item_presentation
getItemGroupsHTML(int $a_pos=0)
ilContainerUserFilter $container_user_filter
getSingleTypeBlockAsynch(string $type)
Render single block.
ilObjectDefinition $obj_definition
renderCard(array $a_item_data, int $a_position=0, bool $a_force_icon=false, string $a_pos_prefix="")
ilGlobalTemplateInterface $tpl
ItemManager $item_manager
ClipboardManager $clipboard
getItemGUI(array $item_data)
const DETAILS_DEACTIVATED
ilContainerGUI $container_gui
Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder,...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getInstance(int $a_obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getCompleteDescriptions(array $objects)
overwrites description fields to long or short description in an assoc array keys needed (obj_id and ...
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
Class ilCtrl provides processing control methods.
saveParameterByClass(string $a_class, $a_parameter)
@inheritDoc
static _getItemsOfContainer(int $a_ref_id)
static getLogger(string $a_component_id)
Get component logger.
Component logger with individual log levels by component id.
static lookupHideTitle(int $a_id)
static getItemsByEvent(int $event_id)
Get session material / event items.
static getItemsByItemGroup(int $item_group_ref_id)
Get materials of item group.
static addListGUIActivationProperty(ilObjectListGUI $list_gui, array &$item)
Get timing details for list gui.
parses the objects.xml it handles the xml-description of all ilias objects
static _getListGUIByType(string $type, int $context=ilObjectListGUI::CONTEXT_REPOSITORY)
static _lookupType(int $id, bool $reference=false)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
static _lookupObjId(int $ref_id)
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
PathGUI which handles materials assigned to sessions.
special template class to simplify handling of ITX/PEAR
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setVariable(string $variable, $value='')
Sets the given variable to the given value.
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
setRightContent(string $a_html)
Sets content of right column.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
setContent(string $a_html)
Sets content for standard template.
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.