3 declare(strict_types=1);
48 $children = $this->tree->getChilds($ref_id);
50 $sorting_settings = $this->container_sorting->getSortingSettings();
52 $sorted = $this->container_sorting->sortItems([
'lsitems' => $children]);
53 $children = $sorted[
'lsitems'];
58 foreach ($children as $position => $child) {
59 $ref_id = (
int) $child[
'child'];
63 $child[
'description'] ??
"",
65 $this->ls_item_online_status->getOnlineStatus($ref_id),
87 fn (
$i) => (
int)
$i[
'child'],
92 foreach ($this->post_conditions_db->select($ref_ids) as $condition) {
93 $conditions[$condition->getRefId()] = $condition;
101 $type_positions = [];
102 foreach ($ls_items as $item) {
103 $type_positions[$item->getRefId()] = $item->getOrderNumber();
105 $this->container_sorting->savePost($type_positions);
110 foreach ($ls_items as $item) {
111 $this->ls_item_online_status->setOnlineStatus(
121 foreach ($ls_items as $item) {
122 $conditions[] = $item->getPostCondition();
124 $this->post_conditions_db->upsert($conditions);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getObjectFor(int $ref_id)
storeItems(array $ls_items)
Use this to apply settings made in ContentGUI.
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilContainerSorting $container_sorting
storeItemsOrder(array $ls_items)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
LSItemOnlineStatus $ls_item_online_status
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
storeOnlineStatus(array $ls_items)
getConditionsForChildren(array $children)
Collect all conditions at once.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilLSPostConditionDB $post_conditions_db
storePostconditions(array $ls_items)
__construct(ilTree $tree, ilContainerSorting $container_sorting, ilLSPostConditionDB $post_conditions_db, LSItemOnlineStatus $ls_item_online_status)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getIconPathForType(string $type)