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();
211 return $this->std_request->getDidacticTemplateId();
217 $ilTabs = $this->tabs;
218 $ilCtrl = $this->ctrl;
219 $cmd = $ilCtrl->getCmd();
220 if (in_array($cmd, [
"displayMediaFullscreen",
"downloadFile",
"displayMedia"])) {
221 $this->checkPermission(
"read");
223 $this->checkPermission(
"write");
226 $ilTabs->clearTargets();
228 if ($this->requested_redirectSource ===
"ilinternallinkgui") {
232 $ilTabs->setBackTarget(
234 $this->ctrl->getLinkTargetByClass(
"ilcontainerpagegui",
"edit")
239 $lng->loadLanguageModule(
"content");
240 $this->content_style_gui->addCss($this->tpl, $this->
object->getRefId());
251 $new_page_object->setParentId($this->
object->getId());
252 $new_page_object->setId($this->
object->getId());
253 $new_page_object->createFromXML();
258 $style = $this->content_style_domain->styleForRefId($this->
object->getRefId());
259 $page_gui->setStyleId(
260 $style->getEffectiveStyleId()
262 $page_gui->setItemPresentationManager($this->getItemPresentation(
264 $page_gui->getLanguage()
266 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
267 $page_gui->setFileDownloadLink(
"");
269 $page_gui->setPresentationTitle(
"");
270 $page_gui->setTemplateOutput(
false);
273 $page_gui->setTabHook($this,
"addPageTabs");
275 return $this->
ctrl->forwardCommand($page_gui);
280 $ilTabs = $this->tabs;
281 $ilCtrl = $this->ctrl;
285 $ilCtrl->getLinkTargetByClass(
"ilObjectContentStyleSettingsGUI",
''),
286 "editStyleProperties",
287 "ilobjectcontentstylesettingsgui"
294 $ilUser = $this->user;
296 if (!
$ilSetting->get(
"enable_cat_page_edit") || $this->object->filteredSubtree()) {
307 $this->content_style_gui->addCss($this->tpl, $this->
object->getRefId());
308 $this->tpl->setCurrentBlock(
"SyntaxStyle");
309 $this->tpl->setVariable(
310 "LOCATION_SYNTAX_STYLESHEET",
313 $this->tpl->parseCurrentBlock();
316 $ot = $this->
object->getObjectTranslation();
317 $lang = $ot->getEffectiveCOPageLang($ilUser->getCurrentLanguage(),
"cont");
319 $style = $this->content_style_domain->styleForRefId($this->
object->getRefId());
320 $page_gui->setStyleId($style->getEffectiveStyleId());
322 $page_gui->setPresentationTitle(
"");
323 $page_gui->setTemplateOutput(
false);
324 $page_gui->setHeader(
"");
325 $ret = $page_gui->showPage();
336 $this->tpl->setTitle($this->
object->getTitle(),
true);
338 parent::setTitleAndDescription();
344 if ($this->isActiveOrdering()) {
348 $this->buildAddNewItemElements($this->getCreatableObjectTypes())
356 if ($this->
object->filteredSubtree()) {
359 switch ($view_mode) {
364 $this->getItemPresentation()
371 $this->getItemPresentation()
380 $this->getItemPresentation()
389 $this->getItemPresentation()
393 return $container_view;
398 $ilTabs = $this->tabs;
399 $ilCtrl = $this->ctrl;
402 $toolbar = $this->toolbar;
405 $container_view = $this->getContentGUI();
407 $this->setContentSubTabs();
408 if ($this->isActiveAdministrationPanel()) {
409 if (!$this->item_presentation->canManageItems()) {
410 $this->
ctrl->redirect($this,
"disableAdministrationPanel");
412 $ilTabs->activateSubTab(
"manage");
414 $ilTabs->activateSubTab(
"view_content");
417 $container_view->setOutput();
421 $is_container_cmd = strtolower($this->std_request->getCmdClass()) === strtolower(get_class($this))
422 || ($this->std_request->getCmdClass() ===
"");
426 if ($is_container_cmd) {
427 $this->showAdministrationPanel();
429 if (!$this->edit_order) {
430 $this->showPossibleSubObjects();
432 if ($this->isActiveAdministrationPanel()) {
433 $this->addImportButtonToToolbar();
436 if (is_object($this->
object) &&
438 $this->rbacsystem->checkAccess(
"write", $this->object->getRefId())
440 if (
$ilSetting->get(
"enable_cat_page_edit")) {
441 if (!$this->isActiveAdministrationPanel() &&
442 !$this->isActiveOrdering() &&
443 $this->supportsPageEditor()
446 $lng->txt(
"cntr_text_media_editor"),
447 $ilCtrl->getLinkTarget($this,
"editPageFrame")
452 if (!$this->edit_order) {
453 if (!$this->isActiveAdministrationPanel() && $this->getCreationMode() ===
false) {
459 $this->showContainerFilter();
461 $this->showPermanentLink();
464 if ($this->requested_ref_id > 1 &&
$ilSetting->get(
"rep_tree_synchronize")) {
465 $ilCtrl->setParameter($this,
"active_node", $this->requested_ref_id);
479 $container_view = $this->getContentGUI();
480 echo $container_view->getSingleTypeBlockAsynch(
481 $this->std_request->getType()
488 $this->addStandardContainerSubTabs();
495 $ilAccess = $this->access;
498 $main_tpl =
$DIC->ui()->mainTemplate();
500 $lng->loadLanguageModule(
'cntr');
502 if ($this->clipboard->hasEntries() && !$this->edit_order) {
504 $main_tpl->setPageFormAction($this->
ctrl->getFormAction($this));
507 $toolbar->setId(
"admclip");
508 $this->
ctrl->setParameter($this,
"type",
"");
509 $this->
ctrl->setParameter($this,
"item_ref_id",
"");
511 $toolbar->addComponent(
512 $this->
ui->factory()->button()->standard(
513 $this->lng->txt(
'paste_clipboard_items'),
514 $this->ctrl->getLinkTargetByClass([ilRepositoryGUI::class, static::class],
'paste')
518 $toolbar->addComponent(
519 $this->
ui->factory()->button()->standard(
520 $this->lng->txt(
'clear_clipboard'),
521 $this->ctrl->getLinkTargetByClass([ilRepositoryGUI::class, static::class],
'clear')
525 $main_tpl->addAdminPanelToolbar($toolbar,
true,
false);
526 } elseif ($this->isActiveAdministrationPanel()) {
528 $main_tpl->setPageFormAction($this->
ctrl->getFormAction($this));
530 $toolbar->setId(
"adm");
531 $this->
ctrl->setParameter($this,
"type",
"");
532 $this->
ctrl->setParameter($this,
"item_ref_id",
"");
534 if ($this->gotItems()) {
535 $toolbar->setLeadingImage(
539 $toolbar->addFormButton(
540 $this->
lng->txt(
'delete_selected_items'),
543 $toolbar->addFormButton(
544 $this->
lng->txt(
'move_selected_items'),
547 $toolbar->addFormButton(
548 $this->
lng->txt(
'copy_selected_items'),
551 $toolbar->addFormButton(
552 $this->
lng->txt(
'link_selected_items'),
556 $toolbar = $this->addAvailabilityPeriodButtonToToolbar($toolbar);
559 if ((
bool) $folder_set->get(
'enable_multi_download') ===
true) {
560 $toolbar->addSeparator();
561 $toolbar->addFormButton(
562 $this->
lng->txt(
'download_selected_items'),
567 $main_tpl->addAdminPanelToolbar(
569 $this->gotItems() && !$this->clipboard->hasEntries(),
570 $this->gotItems() && !$this->clipboard->hasEntries()
574 if ($this->gotItems()) {
575 $main_tpl->setPageFormAction($this->
ctrl->getFormAction($this));
577 } elseif ($this->edit_order) {
578 if ($this->getItemPresentation()->hasItems() && $ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
579 if ($this->isActiveOrdering()) {
581 $main_tpl->setPageFormAction($this->
ctrl->getFormAction($this));
584 $this->
ctrl->setParameter($this,
"type",
"");
585 $this->
ctrl->setParameter($this,
"item_ref_id",
"");
587 $toolbar->addFormButton(
588 $this->
lng->txt(
'sorting_save'),
592 $main_tpl->addAdminPanelToolbar($toolbar,
true,
false);
599 elseif ($this->isMultiDownloadEnabled()) {
602 $num_files = $this->tree->getChildsByType(
$ref_id,
"file");
603 $num_folders = $this->tree->getChildsByType(
$ref_id,
"fold");
604 if (count($num_files) > 0 || count($num_folders) > 0) {
606 $GLOBALS[
'tpl']->setPageFormAction($this->
ctrl->getFormAction($this));
609 $this->
ctrl->setParameter($this,
"type",
"");
610 $this->
ctrl->setParameter($this,
"item_ref_id",
"");
612 $toolbar->addFormButton(
613 $this->
lng->txt(
'download_selected_items'),
617 $GLOBALS[
'tpl']->addAdminPanelToolbar(
623 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'msg_no_downloadable_objects'),
true);
630 return $this->getItemPresentation()->hasItems();
637 $tpl =
$DIC->ui()->mainTemplate();
639 $tpl->setPermanentLink(
641 $this->object->getRefId(),
649 $this->
ctrl->redirectByClass([static::class,
"ilcontainerpagegui"],
"edit");
654 $this->
ctrl->redirect($this,
"");
665 "tpl.container_link_help.html",
668 "components/ILIAS/Container"
690 $childs = $tree->getChilds($this->requested_ref_id);
691 foreach ($childs as $child) {
692 if (in_array($child[
"type"], [
"lm",
"sahs",
"htlm"])) {
695 $cnt[$child[
"type"]]++;
700 $tpl->setVariable(
"TXT_HELP_HEADER",
$lng->txt(
"help"));
701 foreach ($type_ordering as $type) {
702 $tpl->setCurrentBlock(
"row");
703 if ($type !==
"lres") {
706 $lng->txt(
"objs_" . $type) .
707 " (" . ((
int) $cnt[$type]) .
")"
712 $lng->txt(
"obj_lrss") .
713 " (" . ((
int) $cnt[
"lres"]) .
")"
716 $tpl->setVariable(
"TXT_LINK",
"[list-" . $type .
"]");
717 $tpl->parseCurrentBlock();
719 $tpl->printToStdout();
726 bool $a_show_image =
true
728 $icon =
ilUtil::getImagePath(
"standard/icon_" . $a_type .
".svg");
729 $title = $this->
lng->txt(
"objs_" . $a_type);
739 $a_tpl->
setVariable(
"BLOCK_HEADER_CONTENT", $title);
744 public function addStandardRow(
747 ?
int $a_item_ref_id =
null,
748 ?
int $a_item_obj_id =
null,
749 string $a_image_type =
""
754 if (
$ilSetting->get(
"icon_position_in_lists") ===
"item_rows") {
756 $alt = $this->
lng->txt(
"obj_" . $a_image_type);
761 $customIconFactory =
$DIC[
'object.customicons.factory'];
762 $customIcon = $customIconFactory->getPresenterByObjId($a_item_obj_id, $a_image_type);
764 if ($customIcon->exists()) {
765 $icon = $customIcon->getFullPath();
776 if ($this->isActiveAdministrationPanel()) {
782 if ($this->isActiveAdministrationPanel() &&
787 $a_tpl->
setVariable(
'POSITION', sprintf(
'%.1f', $this->current_position++));
804 $type = $this->
lng->txt(
"obj_" . $a_type);
805 $a_message = str_replace(
"[type]", $type, $a_message);
822 if (!$this->isActiveAdministrationPanel()
823 || strtolower($this->
ctrl->getCmdClass()) !==
"ilcontainerpagegui") {
827 $lng->loadLanguageModule(
"content");
832 $this->tabs_gui->setBackTarget(
833 $this->
lng->txt(
"obj_cat"),
834 $this->ctrl->getLinkTarget($this,
"")
837 $this->tabs_gui->addTarget(
839 $this->
ctrl->getLinkTargetByClass(
"ilcontainerpagegui",
"view"),
851 bool $a_include_view =
true
853 $ilTabs = $this->
tabs;
855 $ilCtrl = $this->ctrl;
856 $ilUser = $this->user;
858 if (!is_object($this->
object)) {
862 if ($a_include_view && $this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
863 if (!$this->isActiveAdministrationPanel()) {
864 $ilTabs->addSubTab(
"view_content",
$lng->txt(
"view"), $ilCtrl->getLinkTargetByClass(static::class,
"view"));
869 $ilCtrl->getLinkTarget($this,
"disableAdministrationPanel")
874 $item_presentation = $this->getItemPresentation();
875 if ($item_presentation->canManageItems()) {
876 if ($this->isActiveAdministrationPanel()) {
877 $ilTabs->addSubTab(
"manage",
$lng->txt(
"cntr_manage"), $ilCtrl->getLinkTarget($this,
""));
881 $lng->txt(
"cntr_manage"),
882 $ilCtrl->getLinkTarget($this,
"enableAdministrationPanel")
886 if ($item_presentation->canOrderItems()) {
887 $ilTabs->addSubTab(
"ordering",
$lng->txt(
"cntr_ordering"), $ilCtrl->getLinkTarget($this,
"editOrder"));
893 $rbacsystem = $this->rbacsystem;
894 $ilCtrl = $this->ctrl;
897 if ($rbacsystem->checkAccess(
'edit_permission', $this->ref_id)) {
898 $this->tabs_gui->addTarget(
900 $this->
ctrl->getLinkTargetByClass([get_class($this),
'ilpermissiongui'],
"perm"),
901 [
"perm",
"info",
"owner"],
904 if ($ilCtrl->getNextClass() ===
"ilpermissiongui") {
905 $this->tabs_gui->activateTab(
"perm_settings");
910 if (strtolower($this->std_request->getBaseClass()) ===
"ilrepositorygui" &&
911 $this->clipboard->hasEntries()) {
912 $this->tabs_gui->addTarget(
914 $this->
ctrl->getLinkTarget($this,
"clipboard"),
928 $this->getModeManager()->setAdminMode();
929 $this->
ctrl->redirect($this,
"render");
934 $this->getModeManager()->setContentMode();
935 $this->
ctrl->redirect($this,
"render");
940 $ilTabs = $this->tabs;
941 $this->edit_order =
true;
942 $this->getModeManager()->setOrderingMode();
943 $this->renderObject();
945 $ilTabs->activateSubTab(
"ordering");
951 return $this->edit_order;
956 if ($this->isActiveOrdering()) {
968 $this->multi_download_enabled =
true;
969 $this->renderObject();
974 return $this->multi_download_enabled;
983 $rbacsystem = $this->rbacsystem;
984 $ilCtrl = $this->ctrl;
987 $ids = $this->std_request->getSelectedIds();
990 if (count($ids) === 0) {
991 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
992 $this->
ctrl->redirect($this,
"");
998 $node_data = $this->tree->getNodeData(
$ref_id);
999 $subtree_nodes = $this->tree->getSubTree($node_data);
1001 $all_node_data[] = $node_data;
1002 $all_subtree_nodes[] = $subtree_nodes;
1005 foreach ($subtree_nodes as $node) {
1006 if ($node[
'type'] ===
'rolf') {
1010 if (!$rbacsystem->checkAccess(
'delete', $node[
"ref_id"])) {
1011 $no_cut[] = $node[
"ref_id"];
1016 if (count($no_cut)) {
1018 foreach ($no_cut as $cut_id) {
1022 $this->
lng->txt(
"msg_no_perm_cut") .
" " . implode(
',', $titles),
1026 $this->clipboard->setParent($this->requested_ref_id);
1027 $this->clipboard->setCmd($ilCtrl->getCmd());
1028 $this->clipboard->setRefIds($this->std_request->getSelectedIds());
1030 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"msg_cut_clipboard"),
true);
1032 $this->initAndDisplayMoveIntoObjectObject();
1041 $rbacsystem = $this->rbacsystem;
1042 $ilCtrl = $this->ctrl;
1043 $objDefinition = $this->obj_definition;
1048 $ids = $this->std_request->getSelectedIds();
1050 if (count($ids) === 0) {
1051 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1052 $this->
ctrl->redirect($this,
"");
1059 $node_data = $this->tree->getNodeData(
$ref_id);
1062 if ($objDefinition->isContainer($node_data[
"type"])) {
1066 $subtree_nodes = $this->tree->getSubTree($node_data);
1068 $all_node_data[] = $node_data;
1069 $all_subtree_nodes[] = $subtree_nodes;
1072 foreach ($subtree_nodes as $node) {
1073 if ($node[
'type'] ===
'rolf') {
1077 if (!$rbacsystem->checkAccess(
'visible,read', $node[
"ref_id"])) {
1078 $no_copy[] = $node[
"ref_id"];
1083 if ($containers > 0 && count($this->std_request->getSelectedIds()) > 1) {
1084 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cntr_container_only_on_their_own"),
true);
1085 $this->
ctrl->redirect($this,
"");
1089 if (is_array($no_copy) && count($no_copy)) {
1091 foreach ($no_copy as $copy_id) {
1094 $this->tpl->setOnScreenMessage(
1096 $this->
lng->txt(
"msg_no_perm_copy") .
" " . implode(
',', $titles),
1099 $this->
ctrl->redirect($this,
"");
1103 $ids = $this->std_request->getSelectedIds();
1104 if (count($ids) === 1) {
1105 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_id", $ids[0]);
1107 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_ids", implode(
"_", $ids));
1109 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"initTargetSelection");
1111 $this->clipboard->setParent($this->requested_ref_id);
1112 $this->clipboard->setCmd($ilCtrl->getCmd());
1113 $this->clipboard->setRefIds($ids);
1115 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"msg_copy_clipboard"),
true);
1117 $this->initAndDisplayCopyIntoMultipleObjectsObject();
1129 $initiated_by_folder_action =
false;
1131 $ids = $this->std_request->getSelectedIds();
1133 if (count($ids) === 0) {
1135 $object_type = $object->getType();
1136 if ($object_type ===
"fold") {
1138 $initiated_by_folder_action =
true;
1140 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1141 $this->
ctrl->redirect($this,
"");
1147 $this->
lng->loadLanguageModule(
"cont");
1148 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cont_only_crs_grp_fold_download"),
true);
1149 $this->
ctrl->redirect($this,
"");
1156 $initiated_by_folder_action
1159 $download_job->setBucketTitle($this->getBucketTitle());
1160 if ($download_job->run()) {
1161 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_bt_download_started'),
true);
1163 $GLOBALS[
'DIC']->ctrl()->redirect($this);
1177 $rbacsystem = $this->rbacsystem;
1178 $ilCtrl = $this->ctrl;
1184 $ids = $this->std_request->getSelectedIds();
1186 if (count($ids) === 0) {
1187 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1188 $this->
ctrl->redirect($this,
"");
1193 if (!$rbacsystem->checkAccess(
'delete',
$ref_id)) {
1199 if (!$this->obj_definition->allowLink($object->getType())) {
1200 $no_link[] = $object->getType();
1205 if ($no_cut !== []) {
1206 $this->tpl->setOnScreenMessage(
1208 $this->
lng->txt(
"msg_no_perm_link") .
" " . implode(
',', $no_cut),
1211 $this->
ctrl->redirect($this,
"");
1214 if ($no_link !== []) {
1216 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_obj_no_link'),
true);
1217 $this->
ctrl->redirect($this,
"");
1220 $this->clipboard->setParent($this->requested_ref_id);
1221 $this->clipboard->setCmd($ilCtrl->getCmd());
1222 $this->clipboard->setRefIds($ids);
1225 if (count($this->clipboard->getRefIds()) === 1) {
1228 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"msg_link_clipboard_" . $suffix),
true);
1230 $this->initAndDisplayLinkIntoMultipleObjectsObject();
1238 $this->clipboard->clear();
1243 if ($this->
ctrl->getCmd() ===
"clear") {
1244 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_clear_clipboard"),
true);
1246 $this->
ctrl->redirect($this,
'render');
1252 $rbacsystem = $this->rbacsystem;
1253 $rbacadmin = $this->rbacadmin;
1254 $rbacreview = $this->rbacreview;
1256 $tree = $this->tree;
1257 $ilObjDataCache = $this->obj_data_cache;
1258 $ilUser = $this->user;
1265 $not_allowed_subobject = [];
1268 $command = $this->clipboard->getCmd();
1269 if (!in_array($command, [
'cut',
'link',
'copy'])) {
1270 $message = __METHOD__ .
": cmd was neither 'cut', 'link' nor 'copy'; may be a hack attempt!";
1274 $nodes = $this->std_request->getNodes();
1276 if (count($nodes) === 0) {
1277 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_at_least_one_object'));
1282 $this->showPasteTreeObject();
1289 $folder_objects_cache = [];
1290 foreach ($this->clipboard->getRefIds() as
$ref_id) {
1292 $current_parent_id = $tree->getParentId($obj_data->getRefId());
1294 foreach ($nodes as $folder_ref_id) {
1295 if (!array_key_exists($folder_ref_id, $folder_objects_cache)) {
1300 if (!$rbacsystem->checkAccess(
'create', $folder_ref_id, $obj_data->getType())) {
1301 $no_paste[] = sprintf(
1302 $this->
lng->txt(
'msg_no_perm_paste_object_in_folder'),
1303 $obj_data->getTitle() .
' [' . $obj_data->getRefId() .
']',
1304 $folder_objects_cache[$folder_ref_id]->getTitle(
1305 ) .
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() .
']'
1310 if ($folder_ref_id == $current_parent_id) {
1311 $exists[] = sprintf(
1312 $this->
lng->txt(
'msg_obj_exists_in_folder'),
1313 $obj_data->getTitle() .
' [' . $obj_data->getRefId() .
']',
1314 $folder_objects_cache[$folder_ref_id]->getTitle(
1315 ) .
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() .
']'
1320 if (
$ref_id == $folder_ref_id || $tree->isGrandChild(
$ref_id, $folder_ref_id)) {
1321 $is_child[] = sprintf(
1322 $this->
lng->txt(
'msg_paste_object_not_in_itself'),
1323 $obj_data->getTitle() .
' [' . $obj_data->getRefId() .
']'
1328 if (!array_key_exists(
1329 $obj_data->getType(),
1330 $folder_objects_cache[$folder_ref_id]->getPossibleSubObjects()
1332 $not_allowed_subobject[] = sprintf(
1333 $this->
lng->txt(
'msg_obj_may_not_contain_objects_of_type'),
1334 $folder_objects_cache[$folder_ref_id]->getTitle(
1335 ) .
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() .
']',
1336 $lng->txt(
'obj_' . $obj_data->getType())
1345 if ($command !==
"copy" && count($exists)) {
1346 $error .= implode(
'<br />', $exists);
1349 if (count($is_child)) {
1350 $error .= $error !==
'' ?
'<br />' :
'';
1351 $error .= implode(
'<br />', $is_child);
1354 if (count($not_allowed_subobject)) {
1355 $error .= $error !==
'' ?
'<br />' :
'';
1356 $error .= implode(
'<br />', $not_allowed_subobject);
1359 if (count($no_paste)) {
1360 $error .= $error !==
'' ?
'<br />' :
'';
1361 $error .= implode(
'<br />', $no_paste);
1364 if ($error !==
'') {
1365 $this->tpl->setOnScreenMessage(
'failure', $error);
1370 $this->showPasteTreeObject();
1377 $ilLog->write(__METHOD__ .
", cmd: " . $command);
1383 $ref_ids = $this->clipboard->getRefIds();
1384 $this->clipboard->clear();
1388 if ($command ===
'copy') {
1389 foreach ($nodes as $folder_ref_id) {
1390 foreach ($ref_ids as
$ref_id) {
1393 $oldNode_data = $tree->getNodeData(
$ref_id);
1394 if ($oldNode_data[
'parent'] == $folder_ref_id) {
1396 $newRef = $this->cloneNodes(
$ref_id, $folder_ref_id, $refIdMapping, $newTitle);
1398 $newRef = $this->cloneNodes(
$ref_id, $folder_ref_id, $refIdMapping,
null);
1402 $old_parent_data = $tree->getParentNodeData(
$ref_id);
1403 $newNode_data = $tree->getNodeData($newRef);
1405 $oldNode_data[
'type'],
1407 $oldNode_data[
'obj_id'],
1411 $newNode_data[
'obj_id'],
1414 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1420 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_cloned'),
true);
1424 if ($command ===
'cut') {
1425 foreach ($nodes as $folder_ref_id) {
1426 foreach ($ref_ids as
$ref_id) {
1428 $old_parent = $tree->getParentId(
$ref_id);
1429 $tree->moveTree(
$ref_id, $folder_ref_id);
1430 $rbacadmin->adjustMovedObjectPermissions(
$ref_id, $old_parent);
1435 $availability->update(
$ref_id, $folder_ref_id);
1438 $node_data = $tree->getNodeData(
$ref_id);
1439 $old_parent_data = $tree->getNodeData($old_parent);
1441 $node_data[
'obj_id'],
1444 $old_parent_data[
'obj_id']
1447 $node_data[
'obj_id'],
1450 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1459 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_cut_copied'),
true);
1463 if ($command ===
'link') {
1465 $linked_to_folders = [];
1469 foreach ($nodes as $folder_ref_id) {
1470 $linked_to_folders[$folder_ref_id] = $ilObjDataCache->lookupTitle(
1471 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1474 foreach ($ref_ids as
$ref_id) {
1476 $top_node = $tree->getNodeData(
$ref_id);
1479 $subnodes[
$ref_id] = $tree->getSubTree($top_node);
1483 foreach ($subnodes as $key => $subnode) {
1486 $new_ref_id = $obj_data->createReference();
1487 $obj_data->putInTree($folder_ref_id);
1488 $obj_data->setPermissions($folder_ref_id);
1491 if ($rbac_log_active) {
1492 $rbac_log_roles = $rbacreview->getParentRoleIds($new_ref_id,
false);
1498 $node_data = $tree->getNodeData($new_ref_id);
1500 $node_data[
'obj_id'],
1503 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1508 $ilLog->write(__METHOD__ .
', link finished');
1512 if (count($linked_to_folders)) {
1513 foreach ($linked_to_folders as
$ref_id => $title) {
1514 $links[] = $ui->factory()->link()->standard($title, ilLink::_getLink(
$ref_id));
1519 if (count($ref_ids) === 1) {
1523 $mbox = $ui->factory()->messageBox()->success(
1524 $this->
lng->txt(
'mgs_objects_linked_to_the_following_folders_' . $suffix)
1526 ->withLinks($links);
1528 $this->tpl->setOnScreenMessage(
'success', $ui->renderer()->render($mbox),
true);
1532 $this->clearObject();
1534 $this->
ctrl->returnToParent($this);
1539 $this->showPasteTreeObject();
1544 $ilTabs = $this->tabs;
1547 $ilTabs->setTabActive(
'view_content');
1549 if (!in_array($this->clipboard->getCmd(), [
'link',
'copy',
'cut'])) {
1550 $message = __METHOD__ .
": Unknown action.";
1553 $cmd = $this->clipboard->getCmd();
1556 $exp = $this->getTreeSelectorGUI($cmd);
1557 if ($exp->handleCommand()) {
1560 $output = $exp->getHTML();
1562 $txt_var = ($cmd ===
"copy")
1568 $t->setFormAction($this->
ctrl->getFormAction($this,
"performPasteIntoMultipleObjects"));
1571 $this->
lng->txt($txt_var),
1572 "performPasteIntoMultipleObjects"
1573 )->submit()->toToolbar(
true, $t);
1576 $this->
lng->loadLanguageModule(
'obj');
1577 $t->addFormButton($this->
lng->txt(
"obj_insert_into_clipboard"),
"keepObjectsInClipboard");
1579 $t->addFormButton($this->
lng->txt(
"cancel"),
"cancelMoveLink");
1580 $t->setCloseFormTag(
false);
1582 $output = $t->getHTML() . $output;
1584 $t->setCloseFormTag(
true);
1585 $t->setOpenFormTag(
false);
1586 $output .=
"<br />" . $t->getHTML();
1588 $this->tpl->setContent($output);
1597 $ilCtrl = $this->ctrl;
1599 $this->clipboard->clear();
1600 $ilCtrl->returnToParent($this);
1605 $ilCtrl = $this->ctrl;
1607 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"obj_inserted_clipboard"),
true);
1608 $ilCtrl->returnToParent($this);
1613 $this->showPasteTreeObject();
1618 $this->showPasteTreeObject();
1627 $rbacsystem = $this->rbacsystem;
1628 $rbacadmin = $this->rbacadmin;
1630 $tree = $this->tree;
1631 $ilUser = $this->user;
1632 $ilCtrl = $this->ctrl;
1638 $not_allowed_subobject = [];
1641 if (!in_array($this->clipboard->getCmd(), [
"cut",
"link",
"copy"])) {
1642 $message = get_class(
1644 ) .
"::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
1649 foreach ($this->clipboard->getRefIds() as
$ref_id) {
1653 if (!$rbacsystem->checkAccess(
'create', $this->object->getRefId(), $obj_data->getType())) {
1655 $no_paste_titles[] = $obj_data->getTitle();
1659 if ($this->
object->getRefId() === $this->tree->getParentId($obj_data->getRefId())) {
1665 if ($this->tree->isGrandChild(
$ref_id, $this->object->getRefId())) {
1674 $obj_type = $obj_data->getType();
1676 if (!array_key_exists($obj_type, $this->
object->getPossibleSubObjects())) {
1677 $not_allowed_subobject[] = $obj_data->getType();
1684 if (count($exists) > 0 && $this->clipboard->getCmd() !==
"copy") {
1686 $ilErr->raiseError($this->
lng->txt(
"msg_obj_exists"),
$ilErr->MESSAGE);
1689 if (count($is_child) > 0) {
1691 $this->
lng->txt(
"msg_not_in_itself") .
" " . implode(
',', $is_child),
1696 if (count($not_allowed_subobject) > 0) {
1698 $this->
lng->txt(
"msg_may_not_contain") .
" " . implode(
',', $not_allowed_subobject),
1703 if (count($no_paste) > 0) {
1705 $this->
lng->txt(
"msg_no_perm_paste") .
" " .
1706 implode(
',', $no_paste),
1712 $ilLog->write(
"ilObjectGUI::pasteObject(), cmd: " . $this->clipboard->getCmd());
1718 $ref_ids = $this->clipboard->getRefIds();
1721 $last_cmd = $this->clipboard->getCmd();
1725 if ($this->clipboard->getCmd() ===
"copy") {
1726 $this->clipboard->clear();
1729 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"target", $this->
object->getRefId());
1730 if (count($ref_ids) === 1) {
1731 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_id", $ref_ids[0]);
1733 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_ids", implode(
"_", $ref_ids));
1735 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"saveTarget");
1737 $ilLog->write(
"ilObjectGUI::pasteObject(), copy finished");
1742 if ($this->clipboard->getCmd() ===
"cut") {
1743 foreach ($ref_ids as
$ref_id) {
1745 $old_parent = $tree->getParentId(
$ref_id);
1747 $rbacadmin->adjustMovedObjectPermissions(
$ref_id, $old_parent);
1755 $node_data = $tree->getNodeData(
$ref_id);
1756 $old_parent_data = $tree->getNodeData($old_parent);
1758 $node_data[
'obj_id'],
1761 $old_parent_data[
'obj_id']
1764 $node_data[
'obj_id'],
1767 $this->object->getId()
1776 if ($this->clipboard->getCmd() ===
"link") {
1777 foreach ($ref_ids as
$ref_id) {
1779 $top_node = $this->tree->getNodeData(
$ref_id);
1782 $subnodes[
$ref_id] = $this->tree->getSubTree($top_node);
1785 foreach ($subnodes as $key => $subnode) {
1788 $new_ref_id = $obj_data->createReference();
1789 $obj_data->putInTree($this->requested_ref_id);
1790 $obj_data->setPermissions($this->requested_ref_id);
1793 $node_data = $tree->getNodeData($new_ref_id);
1795 $node_data[
'obj_id'],
1798 $this->object->getId()
1803 $ilLog->write(
"ilObjectGUI::pasteObject(), link finished");
1808 $this->clearObject();
1810 if ($last_cmd ===
"cut") {
1811 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_cut_copied"),
true);
1813 elseif ($last_cmd ===
"copy") {
1814 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_cloned"),
true);
1815 } elseif ($last_cmd ===
'link') {
1817 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_linked"),
true);
1820 $this->
ctrl->returnToParent($this);
1828 $ilTabs = $this->tabs;
1830 $ilToolbar = $this->toolbar;
1831 $ilCtrl = $this->ctrl;
1834 $ilTabs->activateTab(
"clipboard");
1837 if (!$this->clipboard->hasEntries()) {
1838 $message = sprintf(
'%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
1839 $ilLog->write($message, $ilLog->FATAL);
1840 $ilErr->raiseError($this->
lng->txt(
"permission_denied"),
$ilErr->WARNING);
1844 foreach ($this->clipboard->getRefIds() as
$ref_id) {
1850 "type" => $tmp_obj->getType(),
1851 "type_txt" => $this->
lng->txt(
"obj_" . $tmp_obj->getType()),
1852 "title" => $tmp_obj->getTitle(),
1853 "cmd" => ($this->clipboard->getCmd() ===
"cut") ? $this->
lng->txt(
"move") : $this->
lng->txt(
1854 $this->clipboard->getCmd()
1857 "obj_id" => $tmp_obj->getId()
1864 $tab->setData(
$data);
1865 $tpl->setContent($tab->getHTML());
1867 if (count(
$data) > 0) {
1868 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1869 $ilToolbar->addFormButton(
1870 $lng->txt(
"insert_object_here"),
1873 $ilToolbar->addFormButton(
1874 $lng->txt(
"clear_clipboard"),
1883 if ($this->
object->getRefId() &&
1884 !$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
1888 return $this->getModeManager()->isAdminMode();
1893 $ilAccess = $this->access;
1894 parent::setColumnSettings($column_gui);
1897 $this->item_presentation
1902 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
1909 if ($this->isActiveAdministrationPanel()) {
1937 $ilCtrl = $this->ctrl;
1939 $ilAccess = $this->access;
1941 $rbacsystem = $this->rbacsystem;
1943 $new_type = $this->std_request->getNewType();
1945 $clone_source = $this->std_request->getCloneSource();
1947 if (!$rbacsystem->checkAccess(
'create',
$ref_id, $new_type)) {
1948 $ilErr->raiseError($this->
lng->txt(
'permission_denied'));
1950 if (!$clone_source) {
1951 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
1952 $this->createObject();
1955 if (!$ilAccess->checkAccess(
'write',
'', $clone_source, $new_type)) {
1956 $ilErr->raiseError($this->
lng->txt(
'permission_denied'));
1959 $options = $this->std_request->getCopyOptions();
1961 $result = $orig->cloneAllObject(
1971 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_duplicated"),
true);
1972 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $result[
'ref_id']);
1974 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"object_copy_in_progress"),
true);
1975 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$ref_id);
1977 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
1985 $positions = $this->std_request->getPositions();
1986 $sorting->savePost($positions);
1987 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cntr_saved_sorting'),
true);
1988 $this->
ctrl->redirect($this,
"editOrder");
2000 ?
string $newName =
null
2002 $tree = $this->tree;
2006 $newRef = $srcObj->cloneObject($dstRef)->getRefId();
2011 if (!is_null($newName)) {
2013 $newObj->setTitle($newName);
2018 $mapping[$newRef] = $srcRef;
2021 $children = $tree->getChilds($srcRef);
2022 foreach ($tree->getChilds($srcRef) as $child) {
2025 if ($child[
"type"] !==
'rolf') {
2026 $this->cloneNodes($child[
"ref_id"], $newRef, $mapping);
2027 } elseif (count($rolf = $tree->getChildsByType($newRef,
"rolf"))) {
2028 $mapping[$rolf[0][
"ref_id"]] = $child[
"ref_id"];
2057 public static function _buildPath(
2059 int $a_course_ref_id
2063 $tree =
$DIC->repositoryTree();
2066 $path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
2068 foreach ($path_arr as
$data) {
2081 $this->content_style_gui
2082 ->redirectToObjectSettings();
2087 $ctrl = $this->ctrl;
2088 $tabs = $this->tabs;
2089 $tabs->clearTargets();
2091 $tabs->setBackTarget($this->
lng->txt(
'back'), $this->ctrl->getLinkTarget($page_gui,
"edit"));
2099 $ilToolbar = $this->toolbar;
2102 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'webdav_pwd_instruction'));
2103 $this->initFormPasswordInstruction();
2107 $href = $uri_builder->getUriToMountInstructionModalByRef($this->
object->getRefId());
2110 $this->
lng->txt(
"mount_webfolder"),
2112 )->onClick(
"triggerWebDAVModal('$href'); return false;")->toToolbar();
2114 $tpl->setContent($this->
form->getHTML());
2123 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
2127 $ipass->setRequired(
true);
2129 $this->
form->addItem($ipass);
2130 $this->
form->addCommandButton(
"savePassword", $this->
lng->txt(
"save"));
2131 $this->
form->addCommandButton(
'cancel', $this->
lng->txt(
'cancel'));
2133 $this->
form->setTitle($this->
lng->txt(
"chg_ilias_and_webfolder_password"));
2134 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
2141 $ilUser = $this->user;
2143 $form = $this->initFormPasswordInstruction();
2144 if ($form->checkInput()) {
2145 $ilUser->resetPassword($this->
form->getInput(
'new_password'));
2146 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'webdav_pwd_instruction_success'),
true);
2147 $this->showPasswordInstructionObject(
false);
2150 $form->setValuesByPost();
2151 $this->showPasswordInstructionObject();
2163 $child_ref_id = $this->std_request->getChildRefId();
2164 $parent_ref_id = $this->std_request->getParentRefId();
2166 $item_data = $this->
object->getSubItems(
false,
false, $child_ref_id);
2167 $container_view = $this->getContentGUI();
2171 if (isset($this->
object->items[
"sess"])) {
2172 $sess_data = $this->
object->items[
"sess"];
2181 if (in_array($child_ref_id, $event_items)) {
2182 foreach (($sess_data) as
$id) {
2184 foreach ($items as $event_item) {
2185 if ($event_item[
"child"] == $child_ref_id) {
2187 if ($parent_ref_id > 0) {
2188 $event_item[
"parent"] = $parent_ref_id;
2190 $html = $container_view->renderItem($event_item);
2198 foreach (($this->
object->items[
"_all"] ?? []) as
$id) {
2199 if (
$id[
"child"] == $child_ref_id) {
2200 $html = $container_view->renderItem(
$id);
2209 echo $tpl->getOnLoadCodeForAsynch();
2218 $lng->loadLanguageModule($this->
object->getType());
2221 $form->setFormAction($this->
ctrl->getFormAction($this,
"update"));
2222 $form->setTitle($this->
lng->txt($this->object->getType() .
"_edit"));
2224 $this->initFormTitleDescription($form);
2226 $this->initEditCustomForm($form);
2228 $form->addCommandButton(
"update", $this->
lng->txt(
"save"));
2239 if ($this->getCreationMode() ===
false) {
2241 $trans = $this->
object->getObjectTranslation();
2244 $title->setRequired(
true);
2249 if ($this->getCreationMode() ===
false && count($trans->getLanguages()) > 1) {
2250 $languages = $this->domain->metadata()->getLOMLanguagesForSelectInputs();
2252 $this->
lng->txt(
"language") .
": " . $languages[$trans->getDefaultLanguage()] .
2253 ' <a href="' . $this->ctrl->getLinkTargetByClass(TranslationGUI::class,
"") .
2254 '">» ' . $this->lng->txt(
"obj_more_translations") .
'</a>'
2265 if ($this->getCreationMode() ===
false) {
2266 $title->setValue($trans->getDefaultTitle());
2267 $desc->setValue($trans->getDefaultDescription());
2276 array $a_sorting_settings
2283 $sort_inherit->setTitle(
2284 $this->
lng->txt(
'sort_inherit_prefix') .
2287 $this->object->getId()
2292 $sort_inherit->setInfo($this->
lng->txt(
'sorting_info_inherit'));
2293 $sort->addOption($sort_inherit);
2297 $this->
lng->txt(
'sorting_title_header'),
2300 $sort_title->setInfo($this->
lng->txt(
'sorting_info_title'));
2302 $this->initSortingDirectionForm($settings, $sort_title,
'title');
2303 $sort->addOption($sort_title);
2307 $this->
lng->txt(
'sorting_creation_header'),
2310 $sort_activation->setInfo($this->
lng->txt(
'sorting_creation_info'));
2311 $this->initSortingDirectionForm($settings, $sort_activation,
'creation');
2312 $sort->addOption($sort_activation);
2316 $sort_activation->setInfo($this->
lng->txt(
'crs_sort_timing_info'));
2317 $this->initSortingDirectionForm($settings, $sort_activation,
'activation');
2318 $sort->addOption($sort_activation);
2322 $this->
lng->txt(
'sorting_manual_header'),
2325 $sort_manual->setInfo($this->
lng->txt(
'sorting_info_manual'));
2326 $this->initManualSortingOptionForm($settings, $sort_manual,
"manual", $a_sorting_settings);
2327 $sort->addOption($sort_manual);
2331 if (in_array($settings->getSortMode(), $a_sorting_settings)) {
2332 $sort->setValue((
string) $settings->getSortMode());
2349 $item_list->setInfo($this->
lng->txt(
'cont_item_list_info'));
2350 $lpres->addOption($item_list);
2353 $tile_view->setInfo($this->
lng->txt(
'cont_tile_view_info'));
2354 $lpres->addOption($tile_view);
2359 foreach ($this->
object->getTileSizes() as $key => $txt) {
2361 $si->addOption($op);
2363 $tile_view->addSubItem($si);
2379 $val = ($form->
getInput(
'list_presentation') ===
"tile")
2386 (
string) ((
int) $form->
getInput(
'tile_size'))
2398 if ($a_prefix ===
'manual') {
2399 $txt = $this->
lng->txt(
'sorting_new_items_direction');
2401 $txt = $this->
lng->txt(
'sorting_direction');
2405 $direction->setValue((
string) $sorting_settings->getSortDirection());
2406 $direction->setRequired(
true);
2410 $this->
lng->txt(
'sorting_asc'),
2413 $direction->addOption($asc);
2417 $this->
lng->txt(
'sorting_desc'),
2420 $direction->addOption($desc);
2422 $element->addSubItem($direction);
2434 array $a_sorting_settings
2437 $this->
lng->txt(
'sorting_new_items_position'),
2438 $a_prefix .
'_new_items_position'
2441 $position->setRequired(
true);
2445 $this->
lng->txt(
'sorting_new_items_at_top'),
2449 $position->addOption($new_top);
2453 $this->
lng->txt(
'sorting_new_items_at_bottom'),
2457 $position->addOption($new_bottom);
2461 $order =
new ilRadioGroupInputGUI($this->
lng->txt(
'sorting_new_items_order'), $a_prefix .
'_new_items_order');
2463 $order->setRequired(
true);
2468 $this->
lng->txt(
'sorting_title_header'),
2472 $order->addOption($new_title);
2478 $this->
lng->txt(
'sorting_creation_header'),
2482 $order->addOption($new_creation);
2488 $this->
lng->txt(
'crs_sort_activation'),
2492 $order->addOption($new_activation);
2497 $this->initSortingDirectionForm($settings, $element,
'manual');
2507 switch ($form->
getInput(
'sorting')) {
2532 $this->checkPermission(
"write");
2535 $this->tabs_gui->activateTab(
'trash');
2537 $this->
lng->loadLanguageModule(
'cont');
2538 $tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'cont_trash_general_usage'));
2541 $trash_table->init();
2542 $trash_table->parse();
2544 $trash_table->setFilterCommand(
'trashApplyFilter');
2545 $trash_table->setResetCommand(
'trashResetFilter');
2547 $tpl->setContent($trash_table->getHTML());
2552 $this->trashHandleFilter(
true,
false);
2557 $this->trashHandleFilter(
false,
true);
2563 $trash_table->init();
2564 $trash_table->resetOffset();
2565 if ($action_reset) {
2566 $trash_table->resetFilter();
2568 if ($action_apply) {
2569 $trash_table->writeFilterToSession();
2571 $this->trashObject();
2576 $this->checkPermission(
"write");
2578 $ru->removeObjectsFromSystem($this->std_request->getTrashIds());
2579 $this->
ctrl->redirect($this,
"trash");
2584 $this->tabs_gui->activateTab(
'trash');
2587 $ru->restoreToNewLocation();
2596 $ru->restoreObjects(
2597 $this->requested_ref_id,
2598 $this->std_request->getTrashIds()
2600 $this->
ctrl->redirect($this,
"trash");
2606 $this->checkPermission(
"write");
2607 if (count($this->std_request->getTrashIds()) == 0) {
2608 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"no_checkbox"),
true);
2609 $this->
ctrl->redirect($this,
"trash");
2613 $ru->confirmRemoveFromSystemObject($this->std_request->getTrashIds());
2623 $exp->setTypeWhiteList([
"root",
"cat",
"grp",
"crs",
"fold"]);
2627 if (in_array($this->clipboard->getCmd(), [
"link",
"cut"])) {
2628 $lso_types = array_keys($this->obj_definition->getSubObjects(
'lso'));
2629 $refs = $this->clipboard->getRefIds();
2631 foreach ($refs as $item_ref_id) {
2633 if (!in_array($type, $lso_types)) {
2638 $whitelist = $exp->getTypeWhiteList();
2639 $whitelist[] =
'lso';
2640 $exp->setTypeWhiteList($whitelist);
2644 if ($cmd ===
"link") {
2645 $exp->setSelectMode(
"nodes",
true);
2647 $exp->setSelectMode(
"nodes[]",
false);
2654 $this->
ctrl->setReturn($this,
"");
2665 if ($this->isActiveOrdering() || $this->
ctrl->getCmd() ===
"editOrder") {
2669 $filter_service = $this->container_filter_service;
2670 $request =
$DIC->http()->request();
2672 $filter = $filter_service->util()->getFilterForRefId(
2674 $DIC->ctrl()->getLinkTarget($this,
"render",
"",
true),
2675 $this->isActiveAdministrationPanel()
2678 $filter_data =
$DIC->uiService()->filter()->getData($filter);
2680 $this->container_user_filter = $filter_service->userFilter($filter_data);
2681 $this->ui_filter = $filter;
2687 if (!is_null($this->ui_filter)) {
2690 $main_tpl = $this->tpl;
2691 $main_tpl->setFilter(
$renderer->render($this->ui_filter));
2693 $this->object->getId(),
2694 "filter_show_empty",
2697 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_filter_empty"));
2704 if ($this->checkPermissionBool(
"visible,read")) {
2705 $this->tabs_gui->addTab(
2707 $this->
lng->txt(
'view'),
2708 $this->ctrl->getLinkTarget($this,
'view')
2712 if ($this->checkPermissionBool(
"write")) {
2713 $this->tabs_gui->addTab(
2715 $this->
lng->txt(
'trash'),
2716 $this->ctrl->getLinkTarget($this,
'trash')
2720 if ($this->checkPermissionBool(
"edit_permission")) {
2721 $this->tabs_gui->addTab(
2723 $this->
lng->txt(
'perm_settings'),
2724 $this->ctrl->getLinkTargetByClass(
2737 $ctrl = $this->ctrl;
2739 $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, $a_ext_rc=null, $a_ext_time=null)
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.
getDidacticTemplateIdFromQuery()
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()
Class ilObjectActivation.
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(?array $class_path, string $cmd, string $submit_caption="")
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
if(!file_exists('../ilias.ini.php'))