36 protected \ILIAS\Container\InternalGUIService
$gui;
41 protected \ILIAS\Container\InternalDomainService
$domain;
70 bool $a_call_by_reference =
true,
71 bool $a_prepare_output =
true
76 $this->
lng = $DIC->language();
77 $this->tpl =
$DIC[
"tpl"];
78 $this->
ctrl = $DIC->ctrl();
79 $this->
tabs = $DIC->tabs();
81 $this->
user = $DIC->user();
82 $this->
access = $DIC->access();
83 $this->tree =
$DIC->repositoryTree();
84 $this->
error = $DIC[
"ilErr"];
85 $this->obj_definition =
$DIC[
"objDefinition"];
86 $this->rbacadmin =
$DIC->rbac()->admin();
87 $this->rbacreview =
$DIC->rbac()->review();
88 $this->log =
$DIC[
"ilLog"];
89 $this->obj_data_cache =
$DIC[
"ilObjDataCache"];
90 $this->
toolbar = $DIC->toolbar();
91 $this->app_event_handler =
$DIC[
"ilAppEventHandler"];
92 $this->
ui = $DIC->ui();
93 $this->global_screen =
$DIC->globalScreen();
94 $this->component_factory =
$DIC[
"component.factory"];
107 $this->clipboard =
$DIC
112 $this->std_request =
$DIC
117 $this->requested_redirectSource = $this->std_request->getRedirectSource();
118 $this->domain =
$DIC->container()
124 $cs =
$DIC->contentStyle();
125 $this->content_style_gui = $cs->gui();
126 $this->content_style_domain = $cs->domain();
127 $this->gui =
$DIC->container()->internal()->gui();
132 if (is_null($this->mode_manager)) {
133 $this->mode_manager = $this->domain
141 $include_empty_blocks =
true,
143 ): \
ILIAS\Container\Content\ItemPresentationManager {
144 if (is_null($this->item_presentation)) {
145 $this->item_presentation = $this->domain
149 $this->container_user_filter,
150 $include_empty_blocks,
161 $next_class = $this->
ctrl->getNextClass();
162 $cmd = $this->
ctrl->getCmd(
"render");
164 switch ($next_class) {
166 case "ilcontainerpagegui":
167 if ($this->requested_redirectSource !==
"ilinternallinkgui") {
168 $ret = $this->forwardToPageObject();
169 $tpl->setContent($ret);
176 $this->prepareOutput();
185 $values = parent::getEditFormValues();
187 $values[
'didactic_type'] =
199 $new_tpl_id = $this->getDidacticTemplateVar(
'dtpl');
201 if ($new_tpl_id !== $current_tpl_id) {
203 $this->
ctrl->setParameterByClass(ilDidacticTemplateGUI::class,
"didactic_type", $new_tpl_id);
204 $this->
ctrl->redirectByClass(ilDidacticTemplateGUI::class,
"confirmTemplateSwitch");
206 parent::afterUpdate();
213 $ilTabs = $this->tabs;
214 $ilCtrl = $this->ctrl;
215 $cmd = $ilCtrl->getCmd();
216 if (in_array($cmd, [
"displayMediaFullscreen",
"downloadFile",
"displayMedia"])) {
217 $this->checkPermission(
"read");
219 $this->checkPermission(
"write");
222 $ilTabs->clearTargets();
224 if ($this->requested_redirectSource ===
"ilinternallinkgui") {
228 $ilTabs->setBackTarget(
230 $this->ctrl->getLinkTargetByClass(
"ilcontainerpagegui",
"edit")
235 $lng->loadLanguageModule(
"content");
236 $this->content_style_gui->addCss($this->tpl, $this->
object->getRefId());
247 $new_page_object->setParentId($this->
object->getId());
248 $new_page_object->setId($this->
object->getId());
249 $new_page_object->createFromXML();
254 $style = $this->content_style_domain->styleForRefId($this->
object->getRefId());
255 $page_gui->setStyleId(
256 $style->getEffectiveStyleId()
258 $page_gui->setItemPresentationManager($this->getItemPresentation(
260 $page_gui->getLanguage()
262 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
263 $page_gui->setFileDownloadLink(
"");
265 $page_gui->setPresentationTitle(
"");
266 $page_gui->setTemplateOutput(
false);
269 $page_gui->setTabHook($this,
"addPageTabs");
271 return $this->
ctrl->forwardCommand($page_gui);
276 $ilTabs = $this->tabs;
277 $ilCtrl = $this->ctrl;
281 $ilCtrl->getLinkTargetByClass(
"ilObjectContentStyleSettingsGUI",
''),
282 "editStyleProperties",
283 "ilobjectcontentstylesettingsgui"
290 $ilUser = $this->user;
292 if (!
$ilSetting->get(
"enable_cat_page_edit") || $this->object->filteredSubtree()) {
303 $this->content_style_gui->addCss($this->tpl, $this->
object->getRefId());
304 $this->tpl->setCurrentBlock(
"SyntaxStyle");
305 $this->tpl->setVariable(
306 "LOCATION_SYNTAX_STYLESHEET",
309 $this->tpl->parseCurrentBlock();
312 $ot = $this->
object->getObjectTranslation();
313 $lang = $ot->getEffectiveCOPageLang($ilUser->getCurrentLanguage(),
"cont");
315 $style = $this->content_style_domain->styleForRefId($this->
object->getRefId());
316 $page_gui->setStyleId($style->getEffectiveStyleId());
318 $page_gui->setPresentationTitle(
"");
319 $page_gui->setTemplateOutput(
false);
320 $page_gui->setHeader(
"");
321 $ret = $page_gui->showPage();
332 $this->tpl->setTitle($this->
object->getTitle(),
true);
334 parent::setTitleAndDescription();
340 if ($this->isActiveOrdering()) {
344 $this->buildAddNewItemElements($this->getCreatableObjectTypes())
352 if ($this->
object->filteredSubtree()) {
355 switch ($view_mode) {
360 $this->getItemPresentation()
367 $this->getItemPresentation()
376 $this->getItemPresentation()
385 $this->getItemPresentation()
389 return $container_view;
394 $ilTabs = $this->tabs;
395 $ilCtrl = $this->ctrl;
398 $toolbar = $this->toolbar;
401 $container_view = $this->getContentGUI();
403 $this->setContentSubTabs();
404 if ($this->isActiveAdministrationPanel()) {
405 if (!$this->item_presentation->canManageItems()) {
406 $this->
ctrl->redirect($this,
"disableAdministrationPanel");
408 $ilTabs->activateSubTab(
"manage");
410 $ilTabs->activateSubTab(
"view_content");
413 $container_view->setOutput();
417 $is_container_cmd = strtolower($this->std_request->getCmdClass()) === strtolower(get_class($this))
418 || ($this->std_request->getCmdClass() ===
"");
422 if ($is_container_cmd) {
423 $this->showAdministrationPanel();
425 if (!$this->edit_order) {
426 $this->showPossibleSubObjects();
428 if ($this->isActiveAdministrationPanel()) {
429 $this->addImportButtonToToolbar();
432 if (is_object($this->
object) &&
434 $this->rbacsystem->checkAccess(
"write", $this->object->getRefId())
436 if (
$ilSetting->get(
"enable_cat_page_edit")) {
437 if (!$this->isActiveAdministrationPanel() &&
438 !$this->isActiveOrdering() &&
439 $this->supportsPageEditor()
442 $lng->txt(
"cntr_text_media_editor"),
443 $ilCtrl->getLinkTarget($this,
"editPageFrame")
448 if (!$this->edit_order) {
449 if (!$this->isActiveAdministrationPanel() && $this->getCreationMode() ===
false) {
455 $this->showContainerFilter();
457 $this->showPermanentLink();
460 if ($this->requested_ref_id > 1 &&
$ilSetting->get(
"rep_tree_synchronize")) {
461 $ilCtrl->setParameter($this,
"active_node", $this->requested_ref_id);
475 $container_view = $this->getContentGUI();
476 echo $container_view->getSingleTypeBlockAsynch(
477 $this->std_request->getType()
484 $this->addStandardContainerSubTabs();
491 $ilAccess = $this->access;
494 $main_tpl =
$DIC->ui()->mainTemplate();
496 $lng->loadLanguageModule(
'cntr');
498 if ($this->clipboard->hasEntries() && !$this->edit_order) {
500 $main_tpl->setPageFormAction($this->
ctrl->getFormAction($this));
503 $toolbar->setId(
"admclip");
504 $this->
ctrl->setParameter($this,
"type",
"");
505 $this->
ctrl->setParameter($this,
"item_ref_id",
"");
507 $toolbar->addComponent(
508 $this->
ui->factory()->button()->standard(
509 $this->lng->txt(
'paste_clipboard_items'),
510 $this->ctrl->getLinkTargetByClass([ilRepositoryGUI::class, static::class],
'paste')
514 $toolbar->addComponent(
515 $this->
ui->factory()->button()->standard(
516 $this->lng->txt(
'clear_clipboard'),
517 $this->ctrl->getLinkTargetByClass([ilRepositoryGUI::class, static::class],
'clear')
521 $main_tpl->addAdminPanelToolbar($toolbar,
true,
false);
522 } elseif ($this->isActiveAdministrationPanel()) {
524 $main_tpl->setPageFormAction($this->
ctrl->getFormAction($this));
526 $toolbar->setId(
"adm");
527 $this->
ctrl->setParameter($this,
"type",
"");
528 $this->
ctrl->setParameter($this,
"item_ref_id",
"");
530 if ($this->gotItems()) {
531 $toolbar->setLeadingImage(
535 $toolbar->addFormButton(
536 $this->
lng->txt(
'delete_selected_items'),
539 $toolbar->addFormButton(
540 $this->
lng->txt(
'move_selected_items'),
543 $toolbar->addFormButton(
544 $this->
lng->txt(
'copy_selected_items'),
547 $toolbar->addFormButton(
548 $this->
lng->txt(
'link_selected_items'),
552 $toolbar = $this->addAvailabilityPeriodButtonToToolbar($toolbar);
555 if ((
bool) $folder_set->get(
'enable_multi_download') ===
true) {
556 $toolbar->addSeparator();
557 $toolbar->addFormButton(
558 $this->
lng->txt(
'download_selected_items'),
563 $main_tpl->addAdminPanelToolbar(
565 $this->gotItems() && !$this->clipboard->hasEntries(),
566 $this->gotItems() && !$this->clipboard->hasEntries()
570 if ($this->gotItems()) {
571 $main_tpl->setPageFormAction($this->
ctrl->getFormAction($this));
573 } elseif ($this->edit_order) {
574 if ($this->getItemPresentation()->hasItems() && $ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
575 if ($this->isActiveOrdering()) {
577 $main_tpl->setPageFormAction($this->
ctrl->getFormAction($this));
580 $this->
ctrl->setParameter($this,
"type",
"");
581 $this->
ctrl->setParameter($this,
"item_ref_id",
"");
583 $toolbar->addFormButton(
584 $this->
lng->txt(
'sorting_save'),
588 $main_tpl->addAdminPanelToolbar($toolbar,
true,
false);
595 elseif ($this->isMultiDownloadEnabled()) {
598 $num_files = $this->tree->getChildsByType(
$ref_id,
"file");
599 $num_folders = $this->tree->getChildsByType(
$ref_id,
"fold");
600 if (count($num_files) > 0 || count($num_folders) > 0) {
602 $GLOBALS[
'tpl']->setPageFormAction($this->
ctrl->getFormAction($this));
605 $this->
ctrl->setParameter($this,
"type",
"");
606 $this->
ctrl->setParameter($this,
"item_ref_id",
"");
608 $toolbar->addFormButton(
609 $this->
lng->txt(
'download_selected_items'),
613 $GLOBALS[
'tpl']->addAdminPanelToolbar(
619 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'msg_no_downloadable_objects'),
true);
626 return $this->getItemPresentation()->hasItems();
633 $tpl =
$DIC->ui()->mainTemplate();
635 $tpl->setPermanentLink(
637 $this->object->getRefId(),
645 $this->
ctrl->redirectByClass([static::class,
"ilcontainerpagegui"],
"edit");
650 $this->
ctrl->redirect($this,
"");
661 "tpl.container_link_help.html",
664 "components/ILIAS/Container"
686 $childs = $tree->getChilds($this->requested_ref_id);
687 foreach ($childs as $child) {
688 if (in_array($child[
"type"], [
"lm",
"sahs",
"htlm"])) {
691 $cnt[$child[
"type"]]++;
696 $tpl->setVariable(
"TXT_HELP_HEADER",
$lng->txt(
"help"));
697 foreach ($type_ordering as $type) {
698 $tpl->setCurrentBlock(
"row");
699 if ($type !==
"lres") {
702 $lng->txt(
"objs_" . $type) .
703 " (" . ((
int) $cnt[$type]) .
")"
708 $lng->txt(
"obj_lrss") .
709 " (" . ((
int) $cnt[
"lres"]) .
")"
712 $tpl->setVariable(
"TXT_LINK",
"[list-" . $type .
"]");
713 $tpl->parseCurrentBlock();
715 $tpl->printToStdout();
722 bool $a_show_image =
true
724 $icon =
ilUtil::getImagePath(
"standard/icon_" . $a_type .
".svg");
725 $title = $this->
lng->txt(
"objs_" . $a_type);
735 $a_tpl->
setVariable(
"BLOCK_HEADER_CONTENT", $title);
740 public function addStandardRow(
743 ?
int $a_item_ref_id =
null,
744 ?
int $a_item_obj_id =
null,
745 string $a_image_type =
""
750 if (
$ilSetting->get(
"icon_position_in_lists") ===
"item_rows") {
752 $alt = $this->
lng->txt(
"obj_" . $a_image_type);
757 $customIconFactory =
$DIC[
'object.customicons.factory'];
758 $customIcon = $customIconFactory->getPresenterByObjId($a_item_obj_id, $a_image_type);
760 if ($customIcon->exists()) {
761 $icon = $customIcon->getFullPath();
772 if ($this->isActiveAdministrationPanel()) {
778 if ($this->isActiveAdministrationPanel() &&
783 $a_tpl->
setVariable(
'POSITION', sprintf(
'%.1f', $this->current_position++));
800 $type = $this->
lng->txt(
"obj_" . $a_type);
801 $a_message = str_replace(
"[type]", $type, $a_message);
818 if (!$this->isActiveAdministrationPanel()
819 || strtolower($this->
ctrl->getCmdClass()) !==
"ilcontainerpagegui") {
823 $lng->loadLanguageModule(
"content");
828 $this->tabs_gui->setBackTarget(
829 $this->
lng->txt(
"obj_cat"),
830 $this->ctrl->getLinkTarget($this,
"")
833 $this->tabs_gui->addTarget(
835 $this->
ctrl->getLinkTargetByClass(
"ilcontainerpagegui",
"view"),
847 bool $a_include_view =
true
849 $ilTabs = $this->
tabs;
851 $ilCtrl = $this->ctrl;
852 $ilUser = $this->user;
854 if (!is_object($this->
object)) {
858 if ($a_include_view && $this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
859 if (!$this->isActiveAdministrationPanel()) {
860 $ilTabs->addSubTab(
"view_content",
$lng->txt(
"view"), $ilCtrl->getLinkTargetByClass(static::class,
"view"));
865 $ilCtrl->getLinkTarget($this,
"disableAdministrationPanel")
870 $item_presentation = $this->getItemPresentation();
871 if ($item_presentation->canManageItems()) {
872 if ($this->isActiveAdministrationPanel()) {
873 $ilTabs->addSubTab(
"manage",
$lng->txt(
"cntr_manage"), $ilCtrl->getLinkTarget($this,
""));
877 $lng->txt(
"cntr_manage"),
878 $ilCtrl->getLinkTarget($this,
"enableAdministrationPanel")
882 if ($item_presentation->canOrderItems()) {
883 $ilTabs->addSubTab(
"ordering",
$lng->txt(
"cntr_ordering"), $ilCtrl->getLinkTarget($this,
"editOrder"));
889 $rbacsystem = $this->rbacsystem;
890 $ilCtrl = $this->ctrl;
893 if ($rbacsystem->checkAccess(
'edit_permission', $this->ref_id)) {
894 $this->tabs_gui->addTarget(
896 $this->
ctrl->getLinkTargetByClass([get_class($this),
'ilpermissiongui'],
"perm"),
897 [
"perm",
"info",
"owner"],
900 if ($ilCtrl->getNextClass() ===
"ilpermissiongui") {
901 $this->tabs_gui->activateTab(
"perm_settings");
906 if (strtolower($this->std_request->getBaseClass()) ===
"ilrepositorygui" &&
907 $this->clipboard->hasEntries()) {
908 $this->tabs_gui->addTarget(
910 $this->
ctrl->getLinkTarget($this,
"clipboard"),
924 $this->getModeManager()->setAdminMode();
925 $this->
ctrl->redirect($this,
"render");
930 $this->getModeManager()->setContentMode();
931 $this->
ctrl->redirect($this,
"render");
936 $ilTabs = $this->tabs;
937 $this->edit_order =
true;
938 $this->getModeManager()->setOrderingMode();
939 $this->renderObject();
941 $ilTabs->activateSubTab(
"ordering");
947 return $this->edit_order;
952 if ($this->isActiveOrdering()) {
964 $this->multi_download_enabled =
true;
965 $this->renderObject();
970 return $this->multi_download_enabled;
979 $rbacsystem = $this->rbacsystem;
980 $ilCtrl = $this->ctrl;
983 $ids = $this->std_request->getSelectedIds();
986 if (count($ids) === 0) {
987 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
988 $this->
ctrl->redirect($this,
"");
994 $node_data = $this->tree->getNodeData(
$ref_id);
995 $subtree_nodes = $this->tree->getSubTree($node_data);
997 $all_node_data[] = $node_data;
998 $all_subtree_nodes[] = $subtree_nodes;
1001 foreach ($subtree_nodes as $node) {
1002 if ($node[
'type'] ===
'rolf') {
1006 if (!$rbacsystem->checkAccess(
'delete', $node[
"ref_id"])) {
1007 $no_cut[] = $node[
"ref_id"];
1012 if (count($no_cut)) {
1014 foreach ($no_cut as $cut_id) {
1018 $this->
lng->txt(
"msg_no_perm_cut") .
" " . implode(
',', $titles),
1022 $this->clipboard->setParent($this->requested_ref_id);
1023 $this->clipboard->setCmd($ilCtrl->getCmd());
1024 $this->clipboard->setRefIds($this->std_request->getSelectedIds());
1026 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"msg_cut_clipboard"),
true);
1028 $this->initAndDisplayMoveIntoObjectObject();
1037 $rbacsystem = $this->rbacsystem;
1038 $ilCtrl = $this->ctrl;
1039 $objDefinition = $this->obj_definition;
1044 $ids = $this->std_request->getSelectedIds();
1046 if (count($ids) === 0) {
1047 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1048 $this->
ctrl->redirect($this,
"");
1055 $node_data = $this->tree->getNodeData(
$ref_id);
1058 if ($objDefinition->isContainer($node_data[
"type"])) {
1062 $subtree_nodes = $this->tree->getSubTree($node_data);
1064 $all_node_data[] = $node_data;
1065 $all_subtree_nodes[] = $subtree_nodes;
1068 foreach ($subtree_nodes as $node) {
1069 if ($node[
'type'] ===
'rolf') {
1073 if (!$rbacsystem->checkAccess(
'visible,read', $node[
"ref_id"])) {
1074 $no_copy[] = $node[
"ref_id"];
1079 if ($containers > 0 && count($this->std_request->getSelectedIds()) > 1) {
1080 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cntr_container_only_on_their_own"),
true);
1081 $this->
ctrl->redirect($this,
"");
1085 if (is_array($no_copy) && count($no_copy)) {
1087 foreach ($no_copy as $copy_id) {
1090 $this->tpl->setOnScreenMessage(
1092 $this->
lng->txt(
"msg_no_perm_copy") .
" " . implode(
',', $titles),
1095 $this->
ctrl->redirect($this,
"");
1099 $ids = $this->std_request->getSelectedIds();
1100 if (count($ids) === 1) {
1101 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_id", $ids[0]);
1103 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_ids", implode(
"_", $ids));
1105 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"initTargetSelection");
1107 $this->clipboard->setParent($this->requested_ref_id);
1108 $this->clipboard->setCmd($ilCtrl->getCmd());
1109 $this->clipboard->setRefIds($ids);
1111 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"msg_copy_clipboard"),
true);
1113 $this->initAndDisplayCopyIntoMultipleObjectsObject();
1125 $initiated_by_folder_action =
false;
1127 $ids = $this->std_request->getSelectedIds();
1129 if (count($ids) === 0) {
1131 $object_type = $object->getType();
1132 if ($object_type ===
"fold") {
1134 $initiated_by_folder_action =
true;
1136 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1137 $this->
ctrl->redirect($this,
"");
1144 $initiated_by_folder_action
1147 $download_job->setBucketTitle($this->getBucketTitle());
1148 if ($download_job->run()) {
1149 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_bt_download_started'),
true);
1151 $GLOBALS[
'DIC']->ctrl()->redirect($this);
1165 $rbacsystem = $this->rbacsystem;
1166 $ilCtrl = $this->ctrl;
1172 $ids = $this->std_request->getSelectedIds();
1174 if (count($ids) === 0) {
1175 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1176 $this->
ctrl->redirect($this,
"");
1181 if (!$rbacsystem->checkAccess(
'delete',
$ref_id)) {
1187 if (!$this->obj_definition->allowLink($object->getType())) {
1188 $no_link[] = $object->getType();
1193 if ($no_cut !== []) {
1194 $this->tpl->setOnScreenMessage(
1196 $this->
lng->txt(
"msg_no_perm_link") .
" " . implode(
',', $no_cut),
1199 $this->
ctrl->redirect($this,
"");
1202 if ($no_link !== []) {
1204 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_obj_no_link'),
true);
1205 $this->
ctrl->redirect($this,
"");
1208 $this->clipboard->setParent($this->requested_ref_id);
1209 $this->clipboard->setCmd($ilCtrl->getCmd());
1210 $this->clipboard->setRefIds($ids);
1213 if (count($this->clipboard->getRefIds()) === 1) {
1216 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"msg_link_clipboard_" . $suffix),
true);
1218 $this->initAndDisplayLinkIntoMultipleObjectsObject();
1226 $this->clipboard->clear();
1231 if ($this->
ctrl->getCmd() ===
"clear") {
1232 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_clear_clipboard"),
true);
1234 $this->
ctrl->redirect($this,
'render');
1240 $rbacsystem = $this->rbacsystem;
1241 $rbacadmin = $this->rbacadmin;
1242 $rbacreview = $this->rbacreview;
1244 $tree = $this->tree;
1245 $ilObjDataCache = $this->obj_data_cache;
1246 $ilUser = $this->user;
1253 $not_allowed_subobject = [];
1256 $command = $this->clipboard->getCmd();
1257 if (!in_array($command, [
'cut',
'link',
'copy'])) {
1258 $message = __METHOD__ .
": cmd was neither 'cut', 'link' nor 'copy'; may be a hack attempt!";
1262 $nodes = $this->std_request->getNodes();
1264 if (count($nodes) === 0) {
1265 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_at_least_one_object'));
1270 $this->showPasteTreeObject();
1277 $folder_objects_cache = [];
1278 foreach ($this->clipboard->getRefIds() as
$ref_id) {
1280 $current_parent_id = $tree->getParentId($obj_data->getRefId());
1282 foreach ($nodes as $folder_ref_id) {
1283 if (!array_key_exists($folder_ref_id, $folder_objects_cache)) {
1288 if (!$rbacsystem->checkAccess(
'create', $folder_ref_id, $obj_data->getType())) {
1289 $no_paste[] = sprintf(
1290 $this->
lng->txt(
'msg_no_perm_paste_object_in_folder'),
1291 $obj_data->getTitle() .
' [' . $obj_data->getRefId() .
']',
1292 $folder_objects_cache[$folder_ref_id]->getTitle(
1293 ) .
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() .
']'
1298 if ($folder_ref_id == $current_parent_id) {
1299 $exists[] = sprintf(
1300 $this->
lng->txt(
'msg_obj_exists_in_folder'),
1301 $obj_data->getTitle() .
' [' . $obj_data->getRefId() .
']',
1302 $folder_objects_cache[$folder_ref_id]->getTitle(
1303 ) .
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() .
']'
1308 if (
$ref_id == $folder_ref_id || $tree->isGrandChild(
$ref_id, $folder_ref_id)) {
1309 $is_child[] = sprintf(
1310 $this->
lng->txt(
'msg_paste_object_not_in_itself'),
1311 $obj_data->getTitle() .
' [' . $obj_data->getRefId() .
']'
1316 if (!array_key_exists(
1317 $obj_data->getType(),
1318 $folder_objects_cache[$folder_ref_id]->getPossibleSubObjects()
1320 $not_allowed_subobject[] = sprintf(
1321 $this->
lng->txt(
'msg_obj_may_not_contain_objects_of_type'),
1322 $folder_objects_cache[$folder_ref_id]->getTitle(
1323 ) .
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() .
']',
1324 $lng->txt(
'obj_' . $obj_data->getType())
1333 if ($command !==
"copy" && count($exists)) {
1334 $error .= implode(
'<br />', $exists);
1337 if (count($is_child)) {
1338 $error .= $error !==
'' ?
'<br />' :
'';
1339 $error .= implode(
'<br />', $is_child);
1342 if (count($not_allowed_subobject)) {
1343 $error .= $error !==
'' ?
'<br />' :
'';
1344 $error .= implode(
'<br />', $not_allowed_subobject);
1347 if (count($no_paste)) {
1348 $error .= $error !==
'' ?
'<br />' :
'';
1349 $error .= implode(
'<br />', $no_paste);
1352 if ($error !==
'') {
1353 $this->tpl->setOnScreenMessage(
'failure', $error);
1358 $this->showPasteTreeObject();
1365 $ilLog->write(__METHOD__ .
", cmd: " . $command);
1371 $ref_ids = $this->clipboard->getRefIds();
1372 $this->clipboard->clear();
1376 if ($command ===
'copy') {
1377 foreach ($nodes as $folder_ref_id) {
1378 foreach ($ref_ids as
$ref_id) {
1381 $oldNode_data = $tree->getNodeData(
$ref_id);
1382 if ($oldNode_data[
'parent'] == $folder_ref_id) {
1384 $newRef = $this->cloneNodes(
$ref_id, $folder_ref_id, $refIdMapping, $newTitle);
1386 $newRef = $this->cloneNodes(
$ref_id, $folder_ref_id, $refIdMapping,
null);
1390 $old_parent_data = $tree->getParentNodeData(
$ref_id);
1391 $newNode_data = $tree->getNodeData($newRef);
1393 $oldNode_data[
'type'],
1395 $oldNode_data[
'obj_id'],
1399 $newNode_data[
'obj_id'],
1402 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1409 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_cloned'),
true);
1413 if ($command ===
'cut') {
1414 foreach ($nodes as $folder_ref_id) {
1415 foreach ($ref_ids as
$ref_id) {
1417 $old_parent = $tree->getParentId(
$ref_id);
1418 $tree->moveTree(
$ref_id, $folder_ref_id);
1419 $rbacadmin->adjustMovedObjectPermissions(
$ref_id, $old_parent);
1424 $node_data = $tree->getNodeData(
$ref_id);
1425 $old_parent_data = $tree->getNodeData($old_parent);
1427 $node_data[
'obj_id'],
1430 $old_parent_data[
'obj_id']
1433 $node_data[
'obj_id'],
1436 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1446 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_cut_copied'),
true);
1450 if ($command ===
'link') {
1452 $linked_to_folders = [];
1456 foreach ($nodes as $folder_ref_id) {
1457 $linked_to_folders[$folder_ref_id] = $ilObjDataCache->lookupTitle(
1458 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1461 foreach ($ref_ids as
$ref_id) {
1463 $top_node = $tree->getNodeData(
$ref_id);
1466 $subnodes[
$ref_id] = $tree->getSubTree($top_node);
1470 foreach ($subnodes as $key => $subnode) {
1473 $new_ref_id = $obj_data->createReference();
1474 $obj_data->putInTree($folder_ref_id);
1475 $obj_data->setPermissions($folder_ref_id);
1478 if ($rbac_log_active) {
1479 $rbac_log_roles = $rbacreview->getParentRoleIds($new_ref_id,
false);
1485 $node_data = $tree->getNodeData($new_ref_id);
1487 $node_data[
'obj_id'],
1490 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1496 $ilLog->write(__METHOD__ .
', link finished');
1500 if (count($linked_to_folders)) {
1501 foreach ($linked_to_folders as
$ref_id => $title) {
1502 $links[] = $ui->factory()->link()->standard($title, ilLink::_getLink(
$ref_id));
1507 if (count($ref_ids) === 1) {
1511 $mbox = $ui->factory()->messageBox()->success(
1512 $this->
lng->txt(
'mgs_objects_linked_to_the_following_folders_' . $suffix)
1514 ->withLinks($links);
1516 $this->tpl->setOnScreenMessage(
'success', $ui->renderer()->render($mbox),
true);
1520 $this->clearObject();
1522 $this->
ctrl->returnToParent($this);
1527 $this->showPasteTreeObject();
1532 $ilTabs = $this->tabs;
1535 $ilTabs->setTabActive(
'view_content');
1537 if (!in_array($this->clipboard->getCmd(), [
'link',
'copy',
'cut'])) {
1538 $message = __METHOD__ .
": Unknown action.";
1541 $cmd = $this->clipboard->getCmd();
1544 $exp = $this->getTreeSelectorGUI($cmd);
1545 if ($exp->handleCommand()) {
1548 $output = $exp->getHTML();
1550 $txt_var = ($cmd ===
"copy")
1556 $t->setFormAction($this->
ctrl->getFormAction($this,
"performPasteIntoMultipleObjects"));
1559 $this->
lng->txt($txt_var),
1560 "performPasteIntoMultipleObjects"
1561 )->submit()->toToolbar(
true, $t);
1564 $this->
lng->loadLanguageModule(
'obj');
1565 $t->addFormButton($this->
lng->txt(
"obj_insert_into_clipboard"),
"keepObjectsInClipboard");
1567 $t->addFormButton($this->
lng->txt(
"cancel"),
"cancelMoveLink");
1568 $t->setCloseFormTag(
false);
1570 $output = $t->getHTML() . $output;
1572 $t->setCloseFormTag(
true);
1573 $t->setOpenFormTag(
false);
1574 $output .=
"<br />" . $t->getHTML();
1576 $this->tpl->setContent($output);
1585 $ilCtrl = $this->ctrl;
1587 $this->clipboard->clear();
1588 $ilCtrl->returnToParent($this);
1593 $ilCtrl = $this->ctrl;
1595 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"obj_inserted_clipboard"),
true);
1596 $ilCtrl->returnToParent($this);
1601 $this->showPasteTreeObject();
1606 $this->showPasteTreeObject();
1615 $rbacsystem = $this->rbacsystem;
1616 $rbacadmin = $this->rbacadmin;
1618 $tree = $this->tree;
1619 $ilUser = $this->user;
1620 $ilCtrl = $this->ctrl;
1626 $not_allowed_subobject = [];
1629 if (!in_array($this->clipboard->getCmd(), [
"cut",
"link",
"copy"])) {
1632 ) .
"::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
1637 foreach ($this->clipboard->getRefIds() as
$ref_id) {
1641 if (!$rbacsystem->checkAccess(
'create', $this->object->getRefId(), $obj_data->getType())) {
1643 $no_paste_titles[] = $obj_data->getTitle();
1647 if ($this->
object->getRefId() === $this->tree->getParentId($obj_data->getRefId())) {
1653 if ($this->tree->isGrandChild(
$ref_id, $this->object->getRefId())) {
1662 $obj_type = $obj_data->getType();
1664 if (!array_key_exists($obj_type, $this->
object->getPossibleSubObjects())) {
1665 $not_allowed_subobject[] = $obj_data->getType();
1672 if (count($exists) > 0 && $this->clipboard->getCmd() !==
"copy") {
1674 $ilErr->raiseError($this->
lng->txt(
"msg_obj_exists"),
$ilErr->MESSAGE);
1677 if (count($is_child) > 0) {
1679 $this->
lng->txt(
"msg_not_in_itself") .
" " . implode(
',', $is_child),
1684 if (count($not_allowed_subobject) > 0) {
1686 $this->
lng->txt(
"msg_may_not_contain") .
" " . implode(
',', $not_allowed_subobject),
1691 if (count($no_paste) > 0) {
1693 $this->
lng->txt(
"msg_no_perm_paste") .
" " .
1694 implode(
',', $no_paste),
1700 $ilLog->write(
"ilObjectGUI::pasteObject(), cmd: " . $this->clipboard->getCmd());
1706 $ref_ids = $this->clipboard->getRefIds();
1709 $last_cmd = $this->clipboard->getCmd();
1713 if ($this->clipboard->getCmd() ===
"copy") {
1714 $this->clipboard->clear();
1717 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"target", $this->
object->getRefId());
1718 if (count($ref_ids) === 1) {
1719 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_id", $ref_ids[0]);
1721 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_ids", implode(
"_", $ref_ids));
1723 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"saveTarget");
1725 $ilLog->write(
"ilObjectGUI::pasteObject(), copy finished");
1730 if ($this->clipboard->getCmd() ===
"cut") {
1731 foreach ($ref_ids as
$ref_id) {
1733 $old_parent = $tree->getParentId(
$ref_id);
1735 $rbacadmin->adjustMovedObjectPermissions(
$ref_id, $old_parent);
1740 $node_data = $tree->getNodeData(
$ref_id);
1741 $old_parent_data = $tree->getNodeData($old_parent);
1743 $node_data[
'obj_id'],
1746 $old_parent_data[
'obj_id']
1749 $node_data[
'obj_id'],
1752 $this->object->getId()
1762 if ($this->clipboard->getCmd() ===
"link") {
1763 foreach ($ref_ids as
$ref_id) {
1765 $top_node = $this->tree->getNodeData(
$ref_id);
1768 $subnodes[
$ref_id] = $this->tree->getSubTree($top_node);
1771 foreach ($subnodes as $key => $subnode) {
1774 $new_ref_id = $obj_data->createReference();
1775 $obj_data->putInTree($this->requested_ref_id);
1776 $obj_data->setPermissions($this->requested_ref_id);
1779 $node_data = $tree->getNodeData($new_ref_id);
1781 $node_data[
'obj_id'],
1784 $this->object->getId()
1790 $ilLog->write(
"ilObjectGUI::pasteObject(), link finished");
1795 $this->clearObject();
1797 if ($last_cmd ===
"cut") {
1798 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_cut_copied"),
true);
1800 elseif ($last_cmd ===
"copy") {
1801 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_cloned"),
true);
1802 } elseif ($last_cmd ===
'link') {
1804 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_linked"),
true);
1807 $this->
ctrl->returnToParent($this);
1815 $ilTabs = $this->tabs;
1817 $ilToolbar = $this->toolbar;
1818 $ilCtrl = $this->ctrl;
1821 $ilTabs->activateTab(
"clipboard");
1824 if (!$this->clipboard->hasEntries()) {
1825 $message = sprintf(
'%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
1826 $ilLog->write(
$message, $ilLog->FATAL);
1827 $ilErr->raiseError($this->
lng->txt(
"permission_denied"),
$ilErr->WARNING);
1831 foreach ($this->clipboard->getRefIds() as
$ref_id) {
1837 "type" => $tmp_obj->getType(),
1838 "type_txt" => $this->
lng->txt(
"obj_" . $tmp_obj->getType()),
1839 "title" => $tmp_obj->getTitle(),
1840 "cmd" => ($this->clipboard->getCmd() ===
"cut") ? $this->
lng->txt(
"move") : $this->
lng->txt(
1841 $this->clipboard->getCmd()
1844 "obj_id" => $tmp_obj->getId()
1851 $tab->setData(
$data);
1852 $tpl->setContent($tab->getHTML());
1854 if (count(
$data) > 0) {
1855 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1856 $ilToolbar->addFormButton(
1857 $lng->txt(
"insert_object_here"),
1860 $ilToolbar->addFormButton(
1861 $lng->txt(
"clear_clipboard"),
1870 if ($this->
object->getRefId() &&
1871 !$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
1875 return $this->getModeManager()->isAdminMode();
1880 $ilAccess = $this->access;
1881 parent::setColumnSettings($column_gui);
1884 $this->item_presentation
1889 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
1896 if ($this->isActiveAdministrationPanel()) {
1924 $ilCtrl = $this->ctrl;
1926 $ilAccess = $this->access;
1928 $rbacsystem = $this->rbacsystem;
1930 $new_type = $this->std_request->getNewType();
1932 $clone_source = $this->std_request->getCloneSource();
1934 if (!$rbacsystem->checkAccess(
'create',
$ref_id, $new_type)) {
1935 $ilErr->raiseError($this->
lng->txt(
'permission_denied'));
1937 if (!$clone_source) {
1938 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
1939 $this->createObject();
1942 if (!$ilAccess->checkAccess(
'write',
'', $clone_source, $new_type)) {
1943 $ilErr->raiseError($this->
lng->txt(
'permission_denied'));
1946 $options = $this->std_request->getCopyOptions();
1948 $result = $orig->cloneAllObject(
1958 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_duplicated"),
true);
1959 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $result[
'ref_id']);
1961 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"object_copy_in_progress"),
true);
1962 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$ref_id);
1964 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
1972 $positions = $this->std_request->getPositions();
1973 $sorting->savePost($positions);
1974 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cntr_saved_sorting'),
true);
1975 $this->
ctrl->redirect($this,
"editOrder");
1987 ?
string $newName =
null
1989 $tree = $this->tree;
1993 $newRef = $srcObj->cloneObject($dstRef)->getRefId();
1998 if (!is_null($newName)) {
2000 $newObj->setTitle($newName);
2005 $mapping[$newRef] = $srcRef;
2008 $children = $tree->getChilds($srcRef);
2009 foreach ($tree->getChilds($srcRef) as $child) {
2012 if ($child[
"type"] !==
'rolf') {
2013 $this->cloneNodes($child[
"ref_id"], $newRef, $mapping);
2014 } elseif (count($rolf = $tree->getChildsByType($newRef,
"rolf"))) {
2015 $mapping[$rolf[0][
"ref_id"]] = $child[
"ref_id"];
2044 public static function _buildPath(
2046 int $a_course_ref_id
2050 $tree =
$DIC->repositoryTree();
2053 $path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
2055 foreach ($path_arr as
$data) {
2068 $this->content_style_gui
2069 ->redirectToObjectSettings();
2074 $ctrl = $this->ctrl;
2075 $tabs = $this->tabs;
2076 $tabs->clearTargets();
2078 $tabs->setBackTarget($this->
lng->txt(
'back'), $this->ctrl->getLinkTarget($page_gui,
"edit"));
2086 $ilToolbar = $this->toolbar;
2089 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'webdav_pwd_instruction'));
2090 $this->initFormPasswordInstruction();
2094 $href = $uri_builder->getUriToMountInstructionModalByRef($this->
object->getRefId());
2097 $this->
lng->txt(
"mount_webfolder"),
2099 )->onClick(
"triggerWebDAVModal('$href'); return false;")->toToolbar();
2101 $tpl->setContent($this->
form->getHTML());
2110 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
2114 $ipass->setRequired(
true);
2116 $this->
form->addItem($ipass);
2117 $this->
form->addCommandButton(
"savePassword", $this->
lng->txt(
"save"));
2118 $this->
form->addCommandButton(
'cancel', $this->
lng->txt(
'cancel'));
2120 $this->
form->setTitle($this->
lng->txt(
"chg_ilias_and_webfolder_password"));
2121 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
2128 $ilUser = $this->user;
2130 $form = $this->initFormPasswordInstruction();
2131 if ($form->checkInput()) {
2132 $ilUser->resetPassword($this->
form->getInput(
'new_password'));
2133 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'webdav_pwd_instruction_success'),
true);
2134 $this->showPasswordInstructionObject(
false);
2137 $form->setValuesByPost();
2138 $this->showPasswordInstructionObject();
2150 $child_ref_id = $this->std_request->getChildRefId();
2151 $parent_ref_id = $this->std_request->getParentRefId();
2153 $item_data = $this->
object->getSubItems(
false,
false, $child_ref_id);
2154 $container_view = $this->getContentGUI();
2158 if (isset($this->
object->items[
"sess"])) {
2159 $sess_data = $this->
object->items[
"sess"];
2168 if (in_array($child_ref_id, $event_items)) {
2169 foreach (($sess_data) as
$id) {
2171 foreach ($items as $event_item) {
2172 if ($event_item[
"child"] == $child_ref_id) {
2174 if ($parent_ref_id > 0) {
2175 $event_item[
"parent"] = $parent_ref_id;
2177 $html = $container_view->renderItem($event_item);
2185 foreach (($this->
object->items[
"_all"] ?? []) as
$id) {
2186 if (
$id[
"child"] == $child_ref_id) {
2187 $html = $container_view->renderItem(
$id);
2196 echo $tpl->getOnLoadCodeForAsynch();
2205 $lng->loadLanguageModule($this->
object->getType());
2208 $form->setFormAction($this->
ctrl->getFormAction($this,
"update"));
2209 $form->setTitle($this->
lng->txt($this->object->getType() .
"_edit"));
2211 $this->initFormTitleDescription($form);
2213 $this->initEditCustomForm($form);
2215 $form->addCommandButton(
"update", $this->
lng->txt(
"save"));
2226 if ($this->getCreationMode() ===
false) {
2228 $trans = $this->
object->getObjectTranslation();
2231 $title->setRequired(
true);
2236 if ($this->getCreationMode() ===
false && count($trans->getLanguages()) > 1) {
2237 $languages = $this->domain->metadata()->getLOMLanguagesForSelectInputs();
2239 $this->
lng->txt(
"language") .
": " . $languages[$trans->getDefaultLanguage()] .
2240 ' <a href="' . $this->ctrl->getLinkTargetByClass(TranslationGUI::class,
"") .
2241 '">» ' . $this->lng->txt(
"obj_more_translations") .
'</a>'
2252 if ($this->getCreationMode() ===
false) {
2253 $title->setValue($trans->getDefaultTitle());
2254 $desc->setValue($trans->getDefaultDescription());
2263 array $a_sorting_settings
2270 $sort_inherit->setTitle(
2271 $this->
lng->txt(
'sort_inherit_prefix') .
2274 $this->object->getId()
2279 $sort_inherit->setInfo($this->
lng->txt(
'sorting_info_inherit'));
2280 $sort->addOption($sort_inherit);
2284 $this->
lng->txt(
'sorting_title_header'),
2287 $sort_title->setInfo($this->
lng->txt(
'sorting_info_title'));
2289 $this->initSortingDirectionForm($settings, $sort_title,
'title');
2290 $sort->addOption($sort_title);
2294 $this->
lng->txt(
'sorting_creation_header'),
2297 $sort_activation->setInfo($this->
lng->txt(
'sorting_creation_info'));
2298 $this->initSortingDirectionForm($settings, $sort_activation,
'creation');
2299 $sort->addOption($sort_activation);
2303 $sort_activation->setInfo($this->
lng->txt(
'crs_sort_timing_info'));
2304 $this->initSortingDirectionForm($settings, $sort_activation,
'activation');
2305 $sort->addOption($sort_activation);
2309 $this->
lng->txt(
'sorting_manual_header'),
2312 $sort_manual->setInfo($this->
lng->txt(
'sorting_info_manual'));
2313 $this->initManualSortingOptionForm($settings, $sort_manual,
"manual", $a_sorting_settings);
2314 $sort->addOption($sort_manual);
2318 if (in_array($settings->getSortMode(), $a_sorting_settings)) {
2319 $sort->setValue((
string) $settings->getSortMode());
2336 $item_list->setInfo($this->
lng->txt(
'cont_item_list_info'));
2337 $lpres->addOption($item_list);
2340 $tile_view->setInfo($this->
lng->txt(
'cont_tile_view_info'));
2341 $lpres->addOption($tile_view);
2346 foreach ($this->
object->getTileSizes() as $key =>
$txt) {
2348 $si->addOption($op);
2350 $tile_view->addSubItem($si);
2366 $val = ($form->
getInput(
'list_presentation') ===
"tile")
2373 (
string) ((
int) $form->
getInput(
'tile_size'))
2385 if ($a_prefix ===
'manual') {
2386 $txt = $this->
lng->txt(
'sorting_new_items_direction');
2388 $txt = $this->
lng->txt(
'sorting_direction');
2392 $direction->setValue((
string) $sorting_settings->getSortDirection());
2393 $direction->setRequired(
true);
2397 $this->
lng->txt(
'sorting_asc'),
2400 $direction->addOption($asc);
2404 $this->
lng->txt(
'sorting_desc'),
2407 $direction->addOption($desc);
2409 $element->addSubItem($direction);
2421 array $a_sorting_settings
2424 $this->
lng->txt(
'sorting_new_items_position'),
2425 $a_prefix .
'_new_items_position'
2428 $position->setRequired(
true);
2432 $this->
lng->txt(
'sorting_new_items_at_top'),
2436 $position->addOption($new_top);
2440 $this->
lng->txt(
'sorting_new_items_at_bottom'),
2444 $position->addOption($new_bottom);
2448 $order =
new ilRadioGroupInputGUI($this->
lng->txt(
'sorting_new_items_order'), $a_prefix .
'_new_items_order');
2450 $order->setRequired(
true);
2455 $this->
lng->txt(
'sorting_title_header'),
2459 $order->addOption($new_title);
2465 $this->
lng->txt(
'sorting_creation_header'),
2469 $order->addOption($new_creation);
2475 $this->
lng->txt(
'crs_sort_activation'),
2479 $order->addOption($new_activation);
2484 $this->initSortingDirectionForm($settings, $element,
'manual');
2494 switch ($form->
getInput(
'sorting')) {
2519 $this->checkPermission(
"write");
2522 $this->tabs_gui->activateTab(
'trash');
2524 $this->
lng->loadLanguageModule(
'cont');
2525 $tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'cont_trash_general_usage'));
2528 $trash_table->init();
2529 $trash_table->parse();
2531 $trash_table->setFilterCommand(
'trashApplyFilter');
2532 $trash_table->setResetCommand(
'trashResetFilter');
2534 $tpl->setContent($trash_table->getHTML());
2539 $this->trashHandleFilter(
true,
false);
2544 $this->trashHandleFilter(
false,
true);
2550 $trash_table->init();
2551 $trash_table->resetOffset();
2552 if ($action_reset) {
2553 $trash_table->resetFilter();
2555 if ($action_apply) {
2556 $trash_table->writeFilterToSession();
2558 $this->trashObject();
2563 $this->checkPermission(
"write");
2565 $ru->removeObjectsFromSystem($this->std_request->getTrashIds());
2566 $this->
ctrl->redirect($this,
"trash");
2571 $this->tabs_gui->activateTab(
'trash');
2574 $ru->restoreToNewLocation();
2583 $ru->restoreObjects(
2584 $this->requested_ref_id,
2585 $this->std_request->getTrashIds()
2587 $this->
ctrl->redirect($this,
"trash");
2593 $this->checkPermission(
"write");
2594 if (count($this->std_request->getTrashIds()) == 0) {
2595 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"no_checkbox"),
true);
2596 $this->
ctrl->redirect($this,
"trash");
2600 $ru->confirmRemoveFromSystemObject($this->std_request->getTrashIds());
2610 $exp->setTypeWhiteList([
"root",
"cat",
"grp",
"crs",
"fold"]);
2614 if (in_array($this->clipboard->getCmd(), [
"link",
"cut"])) {
2615 $lso_types = array_keys($this->obj_definition->getSubObjects(
'lso'));
2616 $refs = $this->clipboard->getRefIds();
2618 foreach ($refs as $item_ref_id) {
2620 if (!in_array($type, $lso_types)) {
2625 $whitelist = $exp->getTypeWhiteList();
2626 $whitelist[] =
'lso';
2627 $exp->setTypeWhiteList($whitelist);
2631 if ($cmd ===
"link") {
2632 $exp->setSelectMode(
"nodes",
true);
2634 $exp->setSelectMode(
"nodes[]",
false);
2641 $this->
ctrl->setReturn($this,
"");
2652 if ($this->isActiveOrdering() || $this->
ctrl->getCmd() ===
"editOrder") {
2656 $filter_service = $this->container_filter_service;
2657 $request =
$DIC->http()->request();
2659 $filter = $filter_service->util()->getFilterForRefId(
2661 $DIC->ctrl()->getLinkTarget($this,
"render",
"",
true),
2662 $this->isActiveAdministrationPanel()
2665 $filter_data =
$DIC->uiService()->filter()->getData($filter);
2667 $this->container_user_filter = $filter_service->userFilter($filter_data);
2668 $this->ui_filter = $filter;
2674 if (!is_null($this->ui_filter)) {
2677 $main_tpl = $this->tpl;
2678 $main_tpl->setFilter(
$renderer->render($this->ui_filter));
2680 $this->object->getId(),
2681 "filter_show_empty",
2684 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_filter_empty"));
2691 if ($this->checkPermissionBool(
"visible,read")) {
2692 $this->tabs_gui->addTab(
2694 $this->
lng->txt(
'view'),
2695 $this->ctrl->getLinkTarget($this,
'view')
2700 $this->tabs_gui->addTab(
2702 $this->
lng->txt(
'trash'),
2703 $this->ctrl->getLinkTarget($this,
'trash')
2706 if ($this->checkPermissionBool(
"edit_permission")) {
2707 $this->tabs_gui->addTab(
2709 $this->
lng->txt(
'perm_settings'),
2710 $this->ctrl->getLinkTargetByClass(
2723 $ctrl = $this->ctrl;
2725 $ctrl->redirectByClass([
"ilContainerSkillGUI",
"ilContSkillPresentationGUI"]);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
setVariable($variable, $value='')
Sets a variable value.
High level business logic class.
Provides fluid interface to RBAC services.
Render add new item selector.
GUI class for object translation handling.
Manages items in repository clipboard.
static _recordReadEvent(string $a_type, int $a_ref_id, int $obj_id, int $usr_id, bool $isCatchupWriteEvents=true, $a_ext_rc=null, $a_ext_time=null)
static _catchupWriteEvents(int $obj_id, int $usr_id, ?string $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
static _recordWriteEvent(int $obj_id, int $usr_id, string $action, ?int $parent_obj_id=null)
Records a write event.
Column user interface class.
setAdminCommands(bool $a_admincommands)
setItemPresentationManager(ItemPresentationManager $item_presentation)
setBlockProperty(string $a_block_type, string $a_property, string $a_value)
This function is supposed to be used for block type specific properties, that should be passed to ilB...
static _adjustMovedObjectConditions(int $a_ref_id)
In the moment it is not allowed to create preconditions on objects that are located outside of a cour...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Parent class of all container content GUIs.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder,...
clearObject()
clear clipboard and go back to last object
ILIAS Container InternalGUIService $gui
afterUpdate()
Post (successful) object update hook.
ilAppEventHandler $app_event_handler
initAndDisplayMoveIntoObjectObject()
StandardGUIRequest $std_request
ModeManager $mode_manager
isActiveAdministrationPanel()
ilObjectDefinition $obj_definition
restoreToNewLocationObject(?ilPropertyFormGUI $form=null)
addStandardContainerSubTabs(bool $a_include_view=true)
Add standard container subtabs for view, manage, oderdering and text/media editor link.
ilComponentFactory $component_factory
string $requested_redirectSource
initFormPasswordInstruction()
Init password form.
ILIAS Container InternalDomainService $domain
disableAdministrationPanelObject()
modifyItemGUI(ilObjectListGUI $a_item_list_gui, array $a_item_data)
ILIAS Style Content DomainService $content_style_domain
initManualSortingOptionForm(ilContainerSortingSettings $settings, ilRadioOption $element, string $a_prefix, array $a_sorting_settings)
Add manual sorting options.
trashObject()
Show trash content of object.
initAndDisplayCopyIntoMultipleObjectsObject()
cutObject()
cut object(s) out from a container and write the information to clipboard @access public
confirmRemoveFromSystemObject()
getItemPresentation( $include_empty_blocks=true, ?string $lang=null)
enableMultiDownloadObject()
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
initSortingDirectionForm(ilContainerSortingSettings $sorting_settings, ilRadioOption $element, string $a_prefix)
Add sorting direction.
performPasteIntoMultipleObjectsObject()
ilContainerUserFilter $container_user_filter
cancelMoveLinkObject()
Cancel move|link empty clipboard and return to parent.
allowBlocksConfigure()
Standard is to allow blocks configuration.
trashHandleFilter(bool $action_apply, bool $action_reset)
renderBlockAsynchObject()
render the object
ILIAS Container Content ItemPresentationManager $item_presentation
redrawListItemObject()
Redraw a list item (ajax)
undeleteObject()
Get objects back from trash.
showPasswordInstructionObject(bool $a_init=true)
pasteObject()
paste object from clipboard to current place Depending on the chosen command the object(s) are linked...
editStylePropertiesObject()
ilContainerFilterService $container_filter_service
ClipboardManager $clipboard
bool $multi_download_enabled
initAndDisplayLinkIntoMultipleObjectsObject()
saveListPresentation(ilPropertyFormGUI $form)
getTreeSelectorGUI(string $cmd)
addHeaderRow(ilTemplate $a_tpl, string $a_type, bool $a_show_image=true)
cancelPageContentObject()
getAdminTabs()
administration tabs show only permissions and trash folder
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
allowBlocksMoving()
Standard is to allow blocks moving.
enableAdministrationPanelObject()
copyObject()
Copy object(s) out from a container and write the information to clipboard It is not possible to copy...
setColumnSettings(ilColumnGUI $column_gui)
showPossibleSubObjects()
show possible sub objects (pull down menu)
linkObject()
create an new reference of an object in tree it's like a hard link of unix
ILIAS Style Content GUIService $content_style_gui
keepObjectsInClipboardObject()
cloneNodes(int $srcRef, int $dstRef, array &$mapping, ?string $newName=null)
Recursively clones all nodes of the RBAC tree.
showAdministrationPanel()
saveSortingSettings(ilPropertyFormGUI $form)
ilObjectDataCache $obj_data_cache
addMessageRow(ilTemplate $a_tpl, string $a_message, string $a_type)
cloneAllObject()
Clone all object Overwritten method for copying container objects.
getTabs()
@abstract overwrite in derived GUI class of your object type
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Container page GUI class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupSortMode(int $a_obj_id)
static lookupSortModeFromParentContainer(int $a_obj_id)
getSortNewItemsPosition()
setSortNewItemsOrder(int $a_order)
setSortNewItemsPosition(int $a_position)
setSortDirection(int $a_direction)
static sortModeToString(int $a_sort_mode)
Get string representation of sort mode.
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 _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
const SORT_DIRECTION_DESC
const SORT_NEW_ITEMS_ORDER_ACTIVATION
const SORT_NEW_ITEMS_ORDER_TITLE
const SORT_NEW_ITEMS_ORDER_CREATION
const SORT_NEW_ITEMS_POSITION_BOTTOM
const SORT_NEW_ITEMS_POSITION_TOP
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
static _isFinished(int $a_copy_id)
static lookupTemplateId(int $a_ref_id)
Class ilDownloadContainerFilesBackgroundTask.
Error Handling & global info handling.
static _getItemsOfContainer(int $a_ref_id)
static getASCIIFilename(string $a_filename)
special template class to simplify handling of ITX/PEAR
loadLanguageModule(string $a_module)
Load language module.
Component logger with individual log levels by component id.
static showMemberViewSwitch(int $a_ref_id)
static _appendNumberOfCopyToFilename($a_file_name, $nth_copy=null)
Appends the text " - Copy" to a filename in the language of the current user.
static getSyntaxStylePath()
static getItemsByEvent(int $event_id)
Get session material / event items.
parses the objects.xml it handles the xml-description of all ilias objects
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
Class ilObjectGUI Basic methods of all Output classes.
static _lookupObjectId(int $ref_id)
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
static _existsAndNotEmpty(string $a_parent_type, int $a_id, string $a_lang="-")
checks whether page exists and is not empty (may return true on some empty pages)
This class represents an option in a radio group.
Class ilRbacAdmin Core functions for role based access control.
static add(int $action, int $ref_id, array $diff, bool $source_ref_id=false)
static gatherFaPa(int $ref_id, array $role_ids, bool $add_action=false)
class ilRbacReview Contains Review functions of core Rbac.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
Explorer for selecting repository items.
Repository GUI Utilities.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
special template class to simplify handling of ITX/PEAR
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
touchBlock(string $block)
This class represents a text area property in a property form.
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...
Explorer class that works on tree objects (Services/Tree)
Util class various functions, usage as namespace.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
form( $class_path, string $cmd, string $submit_caption="")
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
if(!file_exists('../ilias.ini.php'))