27 public function init(): void
38 $new_item = $this->dom->create_element(
"FileItem");
39 if ($next_li = $li->next_sibling()) {
40 $new_item = $next_li->insert_before($new_item, $next_li);
42 $parent_list = $li->parent_node();
43 $new_item = $parent_list->append_child($new_item);
47 $id_node = $this->dom->create_element(
"Identifier");
48 $id_node = $new_item->append_child($id_node);
49 $id_node->set_attribute(
"Catalog",
"ILIAS");
50 $id_node->set_attribute(
"Entry",
"il__file_" . $a_id);
53 $loc_node = $this->dom->create_element(
"Location");
54 $loc_node = $new_item->append_child($loc_node);
55 $loc_node->set_attribute(
"Type",
"LocalFile");
56 $loc_node->set_content($a_location);
59 $form_node = $this->dom->create_element(
"Format");
60 $form_node = $new_item->append_child($form_node);
61 $form_node->set_content($a_format);
74 $new_item = $this->dom->create_element(
"FileItem");
75 $new_item = $li->insert_before($new_item, $li);
78 $id_node = $this->dom->create_element(
"Identifier");
79 $id_node = $new_item->append_child($id_node);
80 $id_node->set_attribute(
"Catalog",
"ILIAS");
81 $id_node->set_attribute(
"Entry",
"il__file_" . $a_id);
84 $loc_node = $this->dom->create_element(
"Location");
85 $loc_node = $new_item->append_child($loc_node);
86 $loc_node->set_attribute(
"Type",
"LocalFile");
87 $loc_node->set_content($a_location);
90 $form_node = $this->dom->create_element(
"Format");
91 $form_node = $new_item->append_child($form_node);
92 $form_node->set_content($a_format);
110 $next = $li->next_sibling();
111 $next_copy = $next->clone_node(
true);
112 $next_copy = $li->insert_before($next_copy, $li);
113 $next->unlink($next);
122 $prev = $li->previous_sibling();
123 $li_copy = $li->clone_node(
true);
124 $li_copy = $prev->insert_before($li_copy, $prev);
deleteItem()
Delete file item.
setType(string $a_type)
Set Type.
newItemAfter(int $a_id, string $a_location, string $a_format)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
newItemBefore(int $a_id, string $a_location, string $a_format)
insert new list item before current one
moveItemDown()
move list item down
moveItemUp()
move list item up
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...