ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
class.ilPCFileListGUI.php
Go to the documentation of this file.
1<?php
2
21
29{
30 protected \ILIAS\COPage\InternalDomainService $domain;
31 protected string $requested_file_ref_id;
32 protected ilObjUser $user;
33 protected ilTabsGUI $tabs;
34 protected ilTree $tree;
37
38 public function __construct(
39 ilPageObject $a_pg_obj,
40 ?ilPageContent $a_content_obj,
41 string $a_hier_id,
42 string $a_pc_id = ""
43 ) {
44 global $DIC;
45
46 $this->user = $DIC->user();
47 $this->tabs = $DIC->tabs();
48 $this->ctrl = $DIC->ctrl();
49 $this->tpl = $DIC["tpl"];
50 $this->tree = $DIC->repositoryTree();
51 $this->lng = $DIC->language();
52 $this->toolbar = $DIC->toolbar();
53 $this->settings = $DIC->settings();
54 $this->domain = $DIC->copage()->internal()->domain();
55 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
56 $this->setCharacteristics(array("FileListItem" => $this->lng->txt("cont_FileListItem")));
57 $this->requested_file_ref_id = $this->request->getString("file_ref_id");
58 }
59
63 public function executeCommand(): void
64 {
65 // get next class that processes or forwards current command
66 $next_class = $this->ctrl->getNextClass($this);
67
68 $this->getCharacteristicsOfCurrentStyle(["flist_li"]); // scorm-2004
69
70 // get current command
71 $cmd = $this->ctrl->getCmd();
72
73 switch ($next_class) {
74 default:
75 $this->$cmd();
76 break;
77 }
78 }
79
83 public function insert(?ilPropertyFormGUI $a_form = null): void
84 {
85 $ilTabs = $this->tabs;
87
88 if (in_array($sub_command, ["insertNew", "insertFromRepository", "insertFromWorkspace"])) {
89 $this->edit_repo->setSubCmd($sub_command);
90 }
91
92 if (($sub_command == "") && $this->edit_repo->getSubCmd() != "") {
93 $sub_command = $this->edit_repo->getSubCmd();
94 }
95
96 switch ($sub_command) {
97 case "insertFromWorkspace":
98 $this->insertFromWorkspace();
99 break;
100
101 case "insertFromRepository":
102 $this->insertFromRepository();
103 break;
104
105 case "selectFile":
106 $this->selectFile();
107 break;
108
109 default:
110 $this->setTabs();
111 $ilTabs->setSubTabActive("cont_new_file");
112
113 $this->displayValidationError();
114
115 if ($a_form != null) {
116 $form = $a_form;
117 } else {
118 $form = $this->initEditForm("create");
119 }
120 $this->tpl->setContent($form->getHTML());
121 break;
122 }
123 }
124
125 public function selectFile(): void
126 {
127 $ilTabs = $this->tabs;
128 $this->setTabs();
129 $ilTabs->setSubTabActive("cont_file_from_repository");
130
131 $this->displayValidationError();
132 $form = $this->initEditForm("select_file");
133
134 $this->tpl->setContent($form->getHTML());
135 }
136
140 public function insertFromRepository(string $a_cmd = "insert"): void
141 {
142 $ilTabs = $this->tabs;
143 $ilCtrl = $this->ctrl;
145
146 if ($a_cmd == "insert") {
147 $this->setTabs();
148 } else {
149 $this->setItemTabs($a_cmd);
150 }
151
152 $ilTabs->setSubTabActive("cont_file_from_repository");
153 $ilCtrl->setParameter($this, "subCmd", "insertFromRepository");
154
156 $this,
157 $a_cmd,
158 $this,
159 $a_cmd,
160 "file_ref_id"
161 );
162 if (!$exp->handleCommand()) {
163 $tpl->setContent($exp->getHTML());
164 }
165 }
166
170 public function insertFromWorkspace(
171 string $a_cmd = "insert"
172 ): void {
173 $ilTabs = $this->tabs;
174 $ilCtrl = $this->ctrl;
176 $ilUser = $this->user;
177
178 if ($a_cmd == "insert") {
179 $this->setTabs();
180 } else {
181 $this->setItemTabs($a_cmd);
182 }
183
184 $ilTabs->setSubTabActive("cont_file_from_workspace");
185
186 $exp = new ilWorkspaceExplorerGUI($ilUser->getId(), $this, $a_cmd, $this, $a_cmd, "fl_wsp_id");
187 $ilCtrl->setParameter($this, "subCmd", "selectFile");
188 $exp->setCustomLinkTarget($ilCtrl->getLinkTarget($this, $a_cmd));
189 $ilCtrl->setParameter($this, "subCmd", "insertFromWorkspace");
190 $exp->setTypeWhiteList(array("wsrt", "wfld", "file"));
191 $exp->setSelectableTypes(array("file"));
192 if ($exp->handleCommand()) {
193 return;
194 }
195 $tpl->setContent($exp->getHTML());
196 }
197
201 public function create(): void
202 {
203 global $DIC;
204
205 $mode = ($this->requested_file_ref_id != "")
206 ? "select_file"
207 : "create";
208 $form = $this->initEditForm($mode);
209 if (!$form->checkInput()) {
210 $form->setValuesByPost();
211 $this->insert($form);
212 return;
213 }
214
215 // from personal workspace
216 if (substr($this->requested_file_ref_id, 0, 4) == "wsp_") {
217 $fileObj = new ilObjFile(substr($this->requested_file_ref_id, 4), false);
218 }
219 // upload
220 elseif ($this->requested_file_ref_id == "") {
221 $fileObj = new ilObjFile();
222 $fileObj->setType("file");
223 $fileObj->setTitle($_FILES["file"]["name"]);
224 $fileObj->setDescription("");
225 $fileObj->setFileName($_FILES["file"]["name"]);
226 $fileObj->setMode("filelist");
227 $fileObj->create();
228 // upload file to filesystem
229
230 $upload = $DIC->upload();
231 if ($upload->hasBeenProcessed() !== true) {
232 $upload->process();
233 }
234
235 $fileObj->getUploadFile(
236 $_FILES["file"]["tmp_name"],
237 $_FILES["file"]["name"]
238 );
239 }
240 // from repository
241 else {
242 $fileObj = new ilObjFile($this->requested_file_ref_id);
243 }
244 $this->setCurrentTextLang($form->getInput("flst_language"));
245
246 //echo "::".is_object($this->dom).":";
247 $this->content_obj = new ilPCFileList($this->getPage());
248 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
249 $this->content_obj->setListTitle(
250 $form->getInput("flst_title"),
251 $form->getInput("flst_language")
252 );
253 $this->content_obj->appendItem(
254 $fileObj->getId(),
255 $fileObj->getFileName(),
256 $fileObj->getFileType()
257 );
258
259 $this->updated = $this->pg_obj->update();
260 if ($this->updated === true) {
261 $this->afterCreation();
262 } else {
263 $this->insert();
264 }
265 }
266
267 public function afterCreation(): void
268 {
269 $this->pg_obj->stripHierIDs();
270 $this->pg_obj->addHierIDs();
271 $this->ctrl->setParameter($this, "hier_id", $this->content_obj->readHierId());
272 $this->ctrl->setParameter($this, "pc_id", $this->content_obj->readPCId());
273 $this->ctrl->redirect($this, "editFiles");
274 }
275
276 public function edit(): void
277 {
278 $this->editFiles();
279 }
280
284 public function editProperties(): void
285 {
286 $this->setTabs(false);
287
288 $form = $this->initEditForm();
289 $this->tpl->setContent($form->getHTML());
290 }
291
295 public function initEditForm(string $a_mode = "edit"): ilPropertyFormGUI
296 {
298 $ilCtrl = $this->ctrl;
299 $ilUser = $this->user;
300
301 $ti = null;
302 $si = null;
303 $form = new ilPropertyFormGUI();
304
305 if ($a_mode != "add_file") {
306 // title
307 $ti = new ilTextInputGUI($lng->txt("title"), "flst_title");
308 $ti->setMaxLength(80);
309 $ti->setSize(40);
310 $form->addItem($ti);
311
312 // language
313 $languages = [];
314 foreach ($this->lom_services->dataHelper()->getAllLanguages() as $language) {
315 $languages[$language->value()] = $language->presentableLabel();
316 }
317 $si = new ilSelectInputGUI($lng->txt("language"), "flst_language");
318 $si->setOptions($languages);
319 $form->addItem($si);
320 }
321
322 if (in_array($a_mode, array("create", "add_file"))) {
323 // file
324 $fi = new ilFileInputGUI($lng->txt("file"), "file");
325 $fi->setRequired(true);
326 $form->addItem($fi);
327 } elseif (in_array($a_mode, array("select_file"))) {
328 // file
329 $ne = new ilNonEditableValueGUI($lng->txt("file"), "");
330
331 $file_ref_id = (int) $this->requested_file_ref_id;
332 $fl_wsp_id = $this->request->getInt("fl_wsp_id");
333
334 if ($file_ref_id > 0) {
335 $file_obj = new ilObjFile($file_ref_id);
336 if (is_object($file_obj)) {
337 // ref id as hidden input
338 $hi = new ilHiddenInputGUI("file_ref_id");
339 $hi->setValue($file_ref_id);
340 $form->addItem($hi);
341
342 $ne->setValue($file_obj->getTitle());
343 }
344 } elseif ($fl_wsp_id > 0) {
345 // we need the object id for the instance
346 $tree = new ilWorkspaceTree($ilUser->getId());
347 $node = $tree->getNodeData($fl_wsp_id);
348
349 $file_obj = new ilObjFile($node["obj_id"], false);
350 if (is_object($file_obj)) {
351 // ref id as hidden input
352 $hi = new ilHiddenInputGUI("file_ref_id");
353 $hi->setValue("wsp_" . (int) $node["obj_id"]);
354 $form->addItem($hi);
355
356 $ne->setValue($file_obj->getTitle());
357 }
358 $this->tpl->parseCurrentBlock();
359 }
360
361 $form->addItem($ne);
362 }
363
364
365 switch ($a_mode) {
366 case "edit":
367 $ti->setValue($this->content_obj->getListTitle());
368 $si->setValue($this->content_obj->getLanguage());
369 $form->addCommandButton("saveProperties", $lng->txt("save"));
370 $form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
371 $form->setTitle($lng->txt("cont_edit_file_list_properties"));
372 break;
373
374 case "create":
375 case "select_file":
376 if ($this->getCurrentTextLang() != "") {
377 $s_lang = $this->getCurrentTextLang();
378 } else {
379 $s_lang = $ilUser->getLanguage();
380 }
381 $si->setValue($s_lang);
382 $form->addCommandButton("create", $lng->txt("save"));
383 $form->addCommandButton("cancelCreate", $lng->txt("cancel"));
384 $form->setTitle($lng->txt("cont_insert_file_list"));
385 break;
386
387 case "add_file":
388 $form->addCommandButton("insertNewFileItem", $lng->txt("save"));
389 $form->addCommandButton("editFiles", $lng->txt("cancel"));
390 $form->setTitle($lng->txt("cont_insert_file_item"));
391 break;
392 }
393
394 $form->setFormAction($ilCtrl->getFormAction($this));
395
396 return $form;
397 }
398
399
403 public function saveProperties(): void
404 {
405 $form = $this->initEditForm("edit");
406 $form->checkInput();
407 $this->content_obj->setListTitle(
408 $form->getInput("flst_title"),
409 $form->getInput("flst_language")
410 );
411 $this->updated = $this->pg_obj->update();
412 if ($this->updated === true) {
413 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
414 $this->ctrl->redirect($this, "editProperties");
415 } else {
416 $this->pg_obj->addHierIDs();
417 $this->edit();
418 }
419 }
420
424 public function editFiles(): void
425 {
426 $tpl = $this->tpl;
427 $ilToolbar = $this->toolbar;
428 $ilCtrl = $this->ctrl;
430
431 $this->setTabs(false);
432 $this->tabs->activateTab("cont_ed_edit_files");
433
434 $ilToolbar->addButton(
435 $lng->txt("cont_add_file"),
436 $ilCtrl->getLinkTarget($this, "addFileItem")
437 );
438
440 $fl = $this->content_obj;
441 $table = $this->getFileListTable();
442 if ($table->handleCommand()) {
443 return;
444 }
445 $tpl->setContent($table->render());
446 }
447
448 protected function getFileListTable(): TableAdapterGUI
449 {
451 $fl = $this->content_obj;
452 return $this->gui->pc()->fileListTableBuilder($fl, $this, "editFiles")->getTable();
453 }
454
458 public function setTabs(bool $a_create = true): void
459 {
460 $ilTabs = $this->tabs;
461 $ilCtrl = $this->ctrl;
463 $ilSetting = $this->settings;
464
465 if ($a_create) {
466 $cmd = "insert";
467
468 $ilCtrl->setParameter($this, "subCmd", "insertNew");
469 $ilTabs->addSubTabTarget(
470 "cont_new_file",
471 $ilCtrl->getLinkTarget($this, $cmd),
472 $cmd
473 );
474
475 $ilCtrl->setParameter($this, "subCmd", "insertFromRepository");
476 $ilTabs->addSubTabTarget(
477 "cont_file_from_repository",
478 $ilCtrl->getLinkTarget($this, $cmd),
479 $cmd
480 );
481 $ilCtrl->setParameter($this, "subCmd", "");
482
483 if (!$ilSetting->get("disable_personal_workspace") &&
484 !$ilSetting->get("disable_wsp_files")) {
485 $ilCtrl->setParameter($this, "subCmd", "insertFromWorkspace");
486 $ilTabs->addSubTabTarget(
487 "cont_file_from_workspace",
488 $ilCtrl->getLinkTarget($this, $cmd),
489 $cmd
490 );
491 $ilCtrl->setParameter($this, "subCmd", "");
492 }
493 } else {
494 $ilTabs->setBackTarget(
495 $lng->txt("pg"),
496 $this->ctrl->getParentReturn($this)
497 );
498
499 $ilTabs->addTarget(
500 "cont_ed_edit_files",
501 $ilCtrl->getLinkTarget($this, "editFiles"),
502 "editFiles",
503 get_class($this)
504 );
505
506 $ilTabs->addTarget(
507 "cont_ed_edit_prop",
508 $ilCtrl->getLinkTarget($this, "editProperties"),
509 "editProperties",
510 get_class($this)
511 );
512 }
513 }
514
519 public function addFileItem(): void
520 {
521 $ilCtrl = $this->ctrl;
522
523 $files = $this->content_obj->getFileList();
524
525 if (count($files) >= 1) {
526 $ilCtrl->setParameterByClass(
527 "ilpcfileitemgui",
528 "hier_id",
529 $files[count($files) - 1]["hier_id"]
530 );
531 $ilCtrl->setParameterByClass(
532 "ilpcfileitemgui",
533 "pc_id",
534 $files[count($files) - 1]["pc_id"]
535 );
536 $ilCtrl->redirectByClass("ilpcfileitemgui", "newItemAfter");
537 } else {
538 $ilCtrl->redirect($this, "newFileItem");
539 }
540 }
541
545 public function deleteFileItem(): void
546 {
547 $table = $this->getFileListTable();
548 $ids = $table->getItemIds();
549 if (count($ids) > 0) {
550 $this->content_obj->deleteFileItems($ids);
551 }
552 $this->updated = $this->pg_obj->update();
553 $this->ctrl->redirect($this, "editFiles");
554 }
555
556 public function confirmDeletionFileItem(): void
557 {
558 $table = $this->getFileListTable();
559 $ids = $table->getItemIds();
560
561 if (count($ids) === 0) {
562 $this->ctrl->redirect($this, "editFiles");
563 }
564
565 $retrieval = $this->domain->pc()->fileListRetrieval($this->content_obj);
566 $data = $retrieval->getData([]);
567 foreach ($data as $row) {
568 if (in_array($row["id"], $ids)) {
569 $items[$row["id"]] = $row["file_name"];
570 }
571 }
572
573 $table->renderDeletionConfirmation(
574 $this->lng->txt("delete"),
575 $this->lng->txt("cont_delete_file_item_confirm"),
576 "deleteFileItem",
577 $items
578 );
579 }
580
584 public function savePositions(): void
585 {
586 $ilCtrl = $this->ctrl;
587 $table = $this->getFileListTable();
588 $pos = $table->getData();
589 if (is_array($pos) && count($pos) > 0) {
590 $this->content_obj->savePositions($pos);
591 }
592 $this->updated = $this->pg_obj->update();
593 $ilCtrl->redirect($this, "editFiles");
594 }
595
596 public function editStyleClass(string $id)
597 {
598 $form = $this->getEditStyleForm($id);
600 $this->gui->modal($lng->txt("copg_edit_style_class"))
601 ->form($form)
602 ->send();
603 }
604
605 protected function getEditStyleForm(string $id): FormAdapterGUI
606 {
608 $lng->loadLanguageModule("style");
609 $lng->loadLanguageModule("copg");
610
611 $this->ctrl->setParameterByClass(self::class, "file_item_id", $id);
612 $retrieval = $this->domain->pc()->fileListRetrieval($this->content_obj);
613 $options = $this->getCharacteristics();
614 $data = $retrieval->getData([]);
615 $value = null;
616 foreach ($data as $row) {
617 if ($row["id"] == $id && isset($options[$row["class"]])) {
618 $value = $row["class"];
619 }
620 }
621 return $this->gui->form([self::class], "saveStyleClass")
622 ->select("class", $lng->txt("sty_class"), $options, "", $value)
623 ->required();
624 }
625
626 protected function saveStyleClass(): void
627 {
628 $file_item_id = $this->request->getString("file_item_id");
629 $form = $this->getEditStyleForm($file_item_id);
630 if ($form->isValid()) {
631 $class = $form->getData("class");
632 $this->content_obj->saveStyleClass(
633 $file_item_id,
634 $class
635 );
636 $this->updated = $this->pg_obj->update();
637 $this->ctrl->redirect($this, "editFiles");
638 }
639 }
640
644 public function savePositionsAndClasses(): void
645 {
646 $ilCtrl = $this->ctrl;
647
648 $pos = $this->request->getIntArray("position");
649 $class = $this->request->getStringArray("class");
650 if (count($pos) > 0) {
651 $this->content_obj->savePositions($pos);
652 }
653 if (count($class) > 0) {
654 $this->content_obj->saveStyleClasses($class);
655 }
656 $this->updated = $this->pg_obj->update();
657 $ilCtrl->redirect($this, "editFiles");
658 }
659
663 public function checkStyleSelection(): bool
664 {
665 // check whether there is more than one style class
666 $chars = $this->getCharacteristics();
667
668 $classes = $this->content_obj->getAllClasses();
669 if (count($chars) > 1) {
670 return true;
671 }
672 foreach ($classes as $class) {
673 if ($class != "" && $class != "FileListItem") {
674 return true;
675 }
676 }
677 return false;
678 }
679
680 //
681 //
682 // New file item
683 //
684 //
685
689 public function newFileItem(): void
690 {
691 $ilTabs = $this->tabs;
692
693 $sub_command = $this->sub_command;
694 if (in_array($sub_command, ["insertNew", "insertFromRepository", "insertFromWorkspace"])) {
695 $this->edit_repo->setSubCmd($sub_command);
696 }
697
698 if (($sub_command == "") && $this->edit_repo->getSubCmd() != "") {
699 $sub_command = $this->edit_repo->getSubCmd();
700 }
701
702 switch ($sub_command) {
703 case "insertFromWorkspace":
704 $this->insertFromWorkspace("newFileItem");
705 break;
706
707 case "insertFromRepository":
708 $this->insertFromRepository("newFileItem");
709 break;
710
711 case "selectFile":
712 $this->insertNewFileItem($this->requested_file_ref_id);
713 break;
714
715 default:
716 $this->setItemTabs("newFileItem");
717 $ilTabs->setSubTabActive("cont_new_file");
718
719 $this->displayValidationError();
720
721 $form = $this->initEditForm("add_file");
722 $this->tpl->setContent($form->getHTML());
723 break;
724 }
725 }
726
730 public function insertNewFileItem(int $a_file_ref_id = 0): void
731 {
732 $ilUser = $this->user;
733
734 $fl_wsp_id = $this->request->getInt("fl_wsp_id");
735
736 // from personal workspace
737 if ($fl_wsp_id > 0) {
738 // we need the object id for the instance
739 $tree = new ilWorkspaceTree($ilUser->getId());
740 $node = $tree->getNodeData($fl_wsp_id);
741
742 $file_obj = new ilObjFile($node["obj_id"], false);
743 }
744 // upload
745 elseif ($a_file_ref_id == 0) {
746 $file_obj = $this->createFileItem();
747 }
748 // from repository
749 else {
750 $file_obj = new ilObjFile($a_file_ref_id);
751 }
752 if (is_object($file_obj)) {
753 $this->content_obj->appendItem(
754 $file_obj->getId(),
755 $file_obj->getTitle(),
756 $file_obj->getFileType()
757 );
758 $this->updated = $this->pg_obj->update();
759 if ($this->updated === true) {
760 //$this->ctrl->returnToParent($this, "jump".$this->hier_id);
761 $this->ctrl->redirect($this, "editFiles");
762 }
763 }
764
765 $this->newFileItem();
766 }
767
771 public function createFileItem(): ?ilObjFile
772 {
773 global $DIC;
774
776
777 if ($_FILES["file"]["name"] == "") {
778 throw new ilCOPageFileHandlingException($lng->txt("upload_error_file_not_found"));
779 }
780
781 $form = $this->initEditForm();
782 // see #22541
783 // $form->checkInput();
784
785 $fileObj = new ilObjFile();
786 $fileObj->setType("file");
787 $fileObj->setTitle($_FILES["file"]["name"]);
788 $fileObj->setDescription("");
789 $fileObj->setFileName($_FILES["file"]["name"]);
790 $fileObj->setMode("filelist");
791 $fileObj->create();
792 // upload file to filesystem
793
794 $upload = $DIC->upload();
795 if ($upload->hasBeenProcessed() !== true) {
796 $upload->process();
797 }
798
799 $fileObj->getUploadFile(
800 $_FILES["file"]["tmp_name"],
801 $_FILES["file"]["name"]
802 );
803
804 return $fileObj;
805 }
806
807
811 public function setItemTabs(string $a_cmd = ""): void
812 {
813 $ilTabs = $this->tabs;
814 $ilCtrl = $this->ctrl;
815 $ilSetting = $this->settings;
816
817 $ilTabs->addTarget(
818 "cont_back",
819 $this->ctrl->getParentReturn($this),
820 "",
821 ""
822 );
823
824 if ($a_cmd != "") {
825 $ilCtrl->setParameter($this, "subCmd", "insertNew");
826 $ilTabs->addSubTabTarget(
827 "cont_new_file",
828 $ilCtrl->getLinkTarget($this, $a_cmd),
829 $a_cmd
830 );
831
832 $ilCtrl->setParameter($this, "subCmd", "insertFromRepository");
833 $ilTabs->addSubTabTarget(
834 "cont_file_from_repository",
835 $ilCtrl->getLinkTarget($this, $a_cmd),
836 $a_cmd
837 );
838 $ilCtrl->setParameter($this, "subCmd", "");
839
840 if (!$ilSetting->get("disable_personal_workspace") &&
841 !$ilSetting->get("disable_wsp_files")) {
842 $ilCtrl->setParameter($this, "subCmd", "insertFromWorkspace");
843 $ilTabs->addSubTabTarget(
844 "cont_file_from_workspace",
845 $ilCtrl->getLinkTarget($this, $a_cmd),
846 $a_cmd
847 );
848 $ilCtrl->setParameter($this, "subCmd", "");
849 }
850 }
851 }
852}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a file property in a property form.
This class represents a hidden form property in a property form.
This class represents a non editable value in a property form.
Class ilObjFile.
User class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilPCListGUI.
initEditForm(string $a_mode="edit")
Init edit form.
insertNewFileItem(int $a_file_ref_id=0)
insert new file item after another item
executeCommand()
execute command
addFileItem()
Add file item.
newFileItem()
New file item (called, if there is no file item in an existing)
setTabs(bool $a_create=true)
Set Tabs.
insert(?ilPropertyFormGUI $a_form=null)
insert new file list form
setItemTabs(string $a_cmd="")
output tabs
savePositions()
Save positions of file items.
editProperties()
edit properties form
savePositionsAndClasses()
Save positions of file items and style classes.
checkStyleSelection()
Checks whether style selection shoudl be available or not.
saveProperties()
save table properties in db and return to page edit screen
insertFromWorkspace(string $a_cmd="insert")
Insert file from personal workspace.
__construct(ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id, string $a_pc_id="")
create()
create new file list in dom and update page in db
ILIAS COPage InternalDomainService $domain
deleteFileItem()
Delete file items from list.
createFileItem()
insert new file item
insertFromRepository(string $a_cmd="insert")
Insert file from repository.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)
getCharacteristicsOfCurrentStyle(array $a_type)
Get characteristics of current style and call setCharacteristics, if style is given.
ilGlobalTemplateInterface $tpl
setCharacteristics(array $a_chars)
Content object of ilPageObject (see ILIAS DTD).
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
This class represents a property form user interface.
This class represents a selection list property in a property form.
ILIAS Setting Class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
Explorer for selecting a personal workspace item.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setContent(string $a_html)
Sets content for standard template.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $lng
Definition: privfeed.php:26
global $ilSetting
Definition: privfeed.php:26
global $DIC
Definition: shib_login.php:26