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,
"");
1148 $initiated_by_folder_action
1151 $download_job->setBucketTitle($this->getBucketTitle());
1152 if ($download_job->run()) {
1153 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_bt_download_started'),
true);
1155 $GLOBALS[
'DIC']->ctrl()->redirect($this);
1169 $rbacsystem = $this->rbacsystem;
1170 $ilCtrl = $this->ctrl;
1176 $ids = $this->std_request->getSelectedIds();
1178 if (count($ids) === 0) {
1179 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1180 $this->
ctrl->redirect($this,
"");
1185 if (!$rbacsystem->checkAccess(
'delete',
$ref_id)) {
1191 if (!$this->obj_definition->allowLink($object->getType())) {
1192 $no_link[] = $object->getType();
1197 if ($no_cut !== []) {
1198 $this->tpl->setOnScreenMessage(
1200 $this->
lng->txt(
"msg_no_perm_link") .
" " . implode(
',', $no_cut),
1203 $this->
ctrl->redirect($this,
"");
1206 if ($no_link !== []) {
1208 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_obj_no_link'),
true);
1209 $this->
ctrl->redirect($this,
"");
1212 $this->clipboard->setParent($this->requested_ref_id);
1213 $this->clipboard->setCmd($ilCtrl->getCmd());
1214 $this->clipboard->setRefIds($ids);
1217 if (count($this->clipboard->getRefIds()) === 1) {
1220 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"msg_link_clipboard_" . $suffix),
true);
1222 $this->initAndDisplayLinkIntoMultipleObjectsObject();
1230 $this->clipboard->clear();
1235 if ($this->
ctrl->getCmd() ===
"clear") {
1236 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_clear_clipboard"),
true);
1238 $this->
ctrl->redirect($this,
'render');
1244 $rbacsystem = $this->rbacsystem;
1245 $rbacadmin = $this->rbacadmin;
1246 $rbacreview = $this->rbacreview;
1248 $tree = $this->tree;
1249 $ilObjDataCache = $this->obj_data_cache;
1250 $ilUser = $this->user;
1257 $not_allowed_subobject = [];
1260 $command = $this->clipboard->getCmd();
1261 if (!in_array($command, [
'cut',
'link',
'copy'])) {
1262 $message = __METHOD__ .
": cmd was neither 'cut', 'link' nor 'copy'; may be a hack attempt!";
1266 $nodes = $this->std_request->getNodes();
1268 if (count($nodes) === 0) {
1269 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_at_least_one_object'));
1274 $this->showPasteTreeObject();
1281 $folder_objects_cache = [];
1282 foreach ($this->clipboard->getRefIds() as
$ref_id) {
1284 $current_parent_id = $tree->getParentId($obj_data->getRefId());
1286 foreach ($nodes as $folder_ref_id) {
1287 if (!array_key_exists($folder_ref_id, $folder_objects_cache)) {
1292 if (!$rbacsystem->checkAccess(
'create', $folder_ref_id, $obj_data->getType())) {
1293 $no_paste[] = sprintf(
1294 $this->
lng->txt(
'msg_no_perm_paste_object_in_folder'),
1295 $obj_data->getTitle() .
' [' . $obj_data->getRefId() .
']',
1296 $folder_objects_cache[$folder_ref_id]->getTitle(
1297 ) .
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() .
']'
1302 if ($folder_ref_id == $current_parent_id) {
1303 $exists[] = sprintf(
1304 $this->
lng->txt(
'msg_obj_exists_in_folder'),
1305 $obj_data->getTitle() .
' [' . $obj_data->getRefId() .
']',
1306 $folder_objects_cache[$folder_ref_id]->getTitle(
1307 ) .
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() .
']'
1312 if (
$ref_id == $folder_ref_id || $tree->isGrandChild(
$ref_id, $folder_ref_id)) {
1313 $is_child[] = sprintf(
1314 $this->
lng->txt(
'msg_paste_object_not_in_itself'),
1315 $obj_data->getTitle() .
' [' . $obj_data->getRefId() .
']'
1320 if (!array_key_exists(
1321 $obj_data->getType(),
1322 $folder_objects_cache[$folder_ref_id]->getPossibleSubObjects()
1324 $not_allowed_subobject[] = sprintf(
1325 $this->
lng->txt(
'msg_obj_may_not_contain_objects_of_type'),
1326 $folder_objects_cache[$folder_ref_id]->getTitle(
1327 ) .
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() .
']',
1328 $lng->txt(
'obj_' . $obj_data->getType())
1337 if ($command !==
"copy" && count($exists)) {
1338 $error .= implode(
'<br />', $exists);
1341 if (count($is_child)) {
1342 $error .= $error !==
'' ?
'<br />' :
'';
1343 $error .= implode(
'<br />', $is_child);
1346 if (count($not_allowed_subobject)) {
1347 $error .= $error !==
'' ?
'<br />' :
'';
1348 $error .= implode(
'<br />', $not_allowed_subobject);
1351 if (count($no_paste)) {
1352 $error .= $error !==
'' ?
'<br />' :
'';
1353 $error .= implode(
'<br />', $no_paste);
1356 if ($error !==
'') {
1357 $this->tpl->setOnScreenMessage(
'failure', $error);
1362 $this->showPasteTreeObject();
1369 $ilLog->write(__METHOD__ .
", cmd: " . $command);
1375 $ref_ids = $this->clipboard->getRefIds();
1376 $this->clipboard->clear();
1380 if ($command ===
'copy') {
1381 foreach ($nodes as $folder_ref_id) {
1382 foreach ($ref_ids as
$ref_id) {
1385 $oldNode_data = $tree->getNodeData(
$ref_id);
1386 if ($oldNode_data[
'parent'] == $folder_ref_id) {
1388 $newRef = $this->cloneNodes(
$ref_id, $folder_ref_id, $refIdMapping, $newTitle);
1390 $newRef = $this->cloneNodes(
$ref_id, $folder_ref_id, $refIdMapping,
null);
1394 $old_parent_data = $tree->getParentNodeData(
$ref_id);
1395 $newNode_data = $tree->getNodeData($newRef);
1397 $oldNode_data[
'type'],
1399 $oldNode_data[
'obj_id'],
1403 $newNode_data[
'obj_id'],
1406 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1412 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_cloned'),
true);
1416 if ($command ===
'cut') {
1417 foreach ($nodes as $folder_ref_id) {
1418 foreach ($ref_ids as
$ref_id) {
1420 $old_parent = $tree->getParentId(
$ref_id);
1421 $tree->moveTree(
$ref_id, $folder_ref_id);
1422 $rbacadmin->adjustMovedObjectPermissions(
$ref_id, $old_parent);
1427 $node_data = $tree->getNodeData(
$ref_id);
1428 $old_parent_data = $tree->getNodeData($old_parent);
1430 $node_data[
'obj_id'],
1433 $old_parent_data[
'obj_id']
1436 $node_data[
'obj_id'],
1439 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1448 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_cut_copied'),
true);
1452 if ($command ===
'link') {
1454 $linked_to_folders = [];
1458 foreach ($nodes as $folder_ref_id) {
1459 $linked_to_folders[$folder_ref_id] = $ilObjDataCache->lookupTitle(
1460 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1463 foreach ($ref_ids as
$ref_id) {
1465 $top_node = $tree->getNodeData(
$ref_id);
1468 $subnodes[
$ref_id] = $tree->getSubTree($top_node);
1472 foreach ($subnodes as $key => $subnode) {
1475 $new_ref_id = $obj_data->createReference();
1476 $obj_data->putInTree($folder_ref_id);
1477 $obj_data->setPermissions($folder_ref_id);
1480 if ($rbac_log_active) {
1481 $rbac_log_roles = $rbacreview->getParentRoleIds($new_ref_id,
false);
1487 $node_data = $tree->getNodeData($new_ref_id);
1489 $node_data[
'obj_id'],
1492 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1497 $ilLog->write(__METHOD__ .
', link finished');
1501 if (count($linked_to_folders)) {
1502 foreach ($linked_to_folders as
$ref_id => $title) {
1503 $links[] = $ui->factory()->link()->standard($title, ilLink::_getLink(
$ref_id));
1508 if (count($ref_ids) === 1) {
1512 $mbox = $ui->factory()->messageBox()->success(
1513 $this->
lng->txt(
'mgs_objects_linked_to_the_following_folders_' . $suffix)
1515 ->withLinks($links);
1517 $this->tpl->setOnScreenMessage(
'success', $ui->renderer()->render($mbox),
true);
1521 $this->clearObject();
1523 $this->
ctrl->returnToParent($this);
1528 $this->showPasteTreeObject();
1533 $ilTabs = $this->tabs;
1536 $ilTabs->setTabActive(
'view_content');
1538 if (!in_array($this->clipboard->getCmd(), [
'link',
'copy',
'cut'])) {
1539 $message = __METHOD__ .
": Unknown action.";
1542 $cmd = $this->clipboard->getCmd();
1545 $exp = $this->getTreeSelectorGUI($cmd);
1546 if ($exp->handleCommand()) {
1549 $output = $exp->getHTML();
1551 $txt_var = ($cmd ===
"copy")
1557 $t->setFormAction($this->
ctrl->getFormAction($this,
"performPasteIntoMultipleObjects"));
1560 $this->
lng->txt($txt_var),
1561 "performPasteIntoMultipleObjects"
1562 )->submit()->toToolbar(
true, $t);
1565 $this->
lng->loadLanguageModule(
'obj');
1566 $t->addFormButton($this->
lng->txt(
"obj_insert_into_clipboard"),
"keepObjectsInClipboard");
1568 $t->addFormButton($this->
lng->txt(
"cancel"),
"cancelMoveLink");
1569 $t->setCloseFormTag(
false);
1571 $output = $t->getHTML() . $output;
1573 $t->setCloseFormTag(
true);
1574 $t->setOpenFormTag(
false);
1575 $output .=
"<br />" . $t->getHTML();
1577 $this->tpl->setContent($output);
1586 $ilCtrl = $this->ctrl;
1588 $this->clipboard->clear();
1589 $ilCtrl->returnToParent($this);
1594 $ilCtrl = $this->ctrl;
1596 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"obj_inserted_clipboard"),
true);
1597 $ilCtrl->returnToParent($this);
1602 $this->showPasteTreeObject();
1607 $this->showPasteTreeObject();
1616 $rbacsystem = $this->rbacsystem;
1617 $rbacadmin = $this->rbacadmin;
1619 $tree = $this->tree;
1620 $ilUser = $this->user;
1621 $ilCtrl = $this->ctrl;
1627 $not_allowed_subobject = [];
1630 if (!in_array($this->clipboard->getCmd(), [
"cut",
"link",
"copy"])) {
1631 $message = get_class(
1633 ) .
"::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
1638 foreach ($this->clipboard->getRefIds() as
$ref_id) {
1642 if (!$rbacsystem->checkAccess(
'create', $this->object->getRefId(), $obj_data->getType())) {
1644 $no_paste_titles[] = $obj_data->getTitle();
1648 if ($this->
object->getRefId() === $this->tree->getParentId($obj_data->getRefId())) {
1654 if ($this->tree->isGrandChild(
$ref_id, $this->object->getRefId())) {
1663 $obj_type = $obj_data->getType();
1665 if (!array_key_exists($obj_type, $this->
object->getPossibleSubObjects())) {
1666 $not_allowed_subobject[] = $obj_data->getType();
1673 if (count($exists) > 0 && $this->clipboard->getCmd() !==
"copy") {
1675 $ilErr->raiseError($this->
lng->txt(
"msg_obj_exists"),
$ilErr->MESSAGE);
1678 if (count($is_child) > 0) {
1680 $this->
lng->txt(
"msg_not_in_itself") .
" " . implode(
',', $is_child),
1685 if (count($not_allowed_subobject) > 0) {
1687 $this->
lng->txt(
"msg_may_not_contain") .
" " . implode(
',', $not_allowed_subobject),
1692 if (count($no_paste) > 0) {
1694 $this->
lng->txt(
"msg_no_perm_paste") .
" " .
1695 implode(
',', $no_paste),
1701 $ilLog->write(
"ilObjectGUI::pasteObject(), cmd: " . $this->clipboard->getCmd());
1707 $ref_ids = $this->clipboard->getRefIds();
1710 $last_cmd = $this->clipboard->getCmd();
1714 if ($this->clipboard->getCmd() ===
"copy") {
1715 $this->clipboard->clear();
1718 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"target", $this->
object->getRefId());
1719 if (count($ref_ids) === 1) {
1720 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_id", $ref_ids[0]);
1722 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_ids", implode(
"_", $ref_ids));
1724 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"saveTarget");
1726 $ilLog->write(
"ilObjectGUI::pasteObject(), copy finished");
1731 if ($this->clipboard->getCmd() ===
"cut") {
1732 foreach ($ref_ids as
$ref_id) {
1734 $old_parent = $tree->getParentId(
$ref_id);
1736 $rbacadmin->adjustMovedObjectPermissions(
$ref_id, $old_parent);
1741 $node_data = $tree->getNodeData(
$ref_id);
1742 $old_parent_data = $tree->getNodeData($old_parent);
1744 $node_data[
'obj_id'],
1747 $old_parent_data[
'obj_id']
1750 $node_data[
'obj_id'],
1753 $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()
1789 $ilLog->write(
"ilObjectGUI::pasteObject(), link finished");
1794 $this->clearObject();
1796 if ($last_cmd ===
"cut") {
1797 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_cut_copied"),
true);
1799 elseif ($last_cmd ===
"copy") {
1800 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_cloned"),
true);
1801 } elseif ($last_cmd ===
'link') {
1803 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_linked"),
true);
1806 $this->
ctrl->returnToParent($this);
1814 $ilTabs = $this->tabs;
1816 $ilToolbar = $this->toolbar;
1817 $ilCtrl = $this->ctrl;
1820 $ilTabs->activateTab(
"clipboard");
1823 if (!$this->clipboard->hasEntries()) {
1824 $message = sprintf(
'%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
1825 $ilLog->write($message, $ilLog->FATAL);
1826 $ilErr->raiseError($this->
lng->txt(
"permission_denied"),
$ilErr->WARNING);
1830 foreach ($this->clipboard->getRefIds() as
$ref_id) {
1836 "type" => $tmp_obj->getType(),
1837 "type_txt" => $this->
lng->txt(
"obj_" . $tmp_obj->getType()),
1838 "title" => $tmp_obj->getTitle(),
1839 "cmd" => ($this->clipboard->getCmd() ===
"cut") ? $this->
lng->txt(
"move") : $this->
lng->txt(
1840 $this->clipboard->getCmd()
1843 "obj_id" => $tmp_obj->getId()
1850 $tab->setData(
$data);
1851 $tpl->setContent($tab->getHTML());
1853 if (count(
$data) > 0) {
1854 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1855 $ilToolbar->addFormButton(
1856 $lng->txt(
"insert_object_here"),
1859 $ilToolbar->addFormButton(
1860 $lng->txt(
"clear_clipboard"),
1869 if ($this->
object->getRefId() &&
1870 !$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
1874 return $this->getModeManager()->isAdminMode();
1879 $ilAccess = $this->access;
1880 parent::setColumnSettings($column_gui);
1883 $this->item_presentation
1888 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
1895 if ($this->isActiveAdministrationPanel()) {
1923 $ilCtrl = $this->ctrl;
1925 $ilAccess = $this->access;
1927 $rbacsystem = $this->rbacsystem;
1929 $new_type = $this->std_request->getNewType();
1931 $clone_source = $this->std_request->getCloneSource();
1933 if (!$rbacsystem->checkAccess(
'create',
$ref_id, $new_type)) {
1934 $ilErr->raiseError($this->
lng->txt(
'permission_denied'));
1936 if (!$clone_source) {
1937 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
1938 $this->createObject();
1941 if (!$ilAccess->checkAccess(
'write',
'', $clone_source, $new_type)) {
1942 $ilErr->raiseError($this->
lng->txt(
'permission_denied'));
1945 $options = $this->std_request->getCopyOptions();
1947 $result = $orig->cloneAllObject(
1957 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_duplicated"),
true);
1958 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $result[
'ref_id']);
1960 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"object_copy_in_progress"),
true);
1961 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$ref_id);
1963 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
1971 $positions = $this->std_request->getPositions();
1972 $sorting->savePost($positions);
1973 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cntr_saved_sorting'),
true);
1974 $this->
ctrl->redirect($this,
"editOrder");
1986 ?
string $newName =
null
1988 $tree = $this->tree;
1992 $newRef = $srcObj->cloneObject($dstRef)->getRefId();
1997 if (!is_null($newName)) {
1999 $newObj->setTitle($newName);
2004 $mapping[$newRef] = $srcRef;
2007 $children = $tree->getChilds($srcRef);
2008 foreach ($tree->getChilds($srcRef) as $child) {
2011 if ($child[
"type"] !==
'rolf') {
2012 $this->cloneNodes($child[
"ref_id"], $newRef, $mapping);
2013 } elseif (count($rolf = $tree->getChildsByType($newRef,
"rolf"))) {
2014 $mapping[$rolf[0][
"ref_id"]] = $child[
"ref_id"];
2043 public static function _buildPath(
2045 int $a_course_ref_id
2049 $tree =
$DIC->repositoryTree();
2052 $path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
2054 foreach ($path_arr as
$data) {
2067 $this->content_style_gui
2068 ->redirectToObjectSettings();
2073 $ctrl = $this->ctrl;
2074 $tabs = $this->tabs;
2075 $tabs->clearTargets();
2077 $tabs->setBackTarget($this->
lng->txt(
'back'), $this->ctrl->getLinkTarget($page_gui,
"edit"));
2085 $ilToolbar = $this->toolbar;
2088 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'webdav_pwd_instruction'));
2089 $this->initFormPasswordInstruction();
2093 $href = $uri_builder->getUriToMountInstructionModalByRef($this->
object->getRefId());
2096 $this->
lng->txt(
"mount_webfolder"),
2098 )->onClick(
"triggerWebDAVModal('$href'); return false;")->toToolbar();
2100 $tpl->setContent($this->
form->getHTML());
2109 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
2113 $ipass->setRequired(
true);
2115 $this->
form->addItem($ipass);
2116 $this->
form->addCommandButton(
"savePassword", $this->
lng->txt(
"save"));
2117 $this->
form->addCommandButton(
'cancel', $this->
lng->txt(
'cancel'));
2119 $this->
form->setTitle($this->
lng->txt(
"chg_ilias_and_webfolder_password"));
2120 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
2127 $ilUser = $this->user;
2129 $form = $this->initFormPasswordInstruction();
2130 if ($form->checkInput()) {
2131 $ilUser->resetPassword($this->
form->getInput(
'new_password'));
2132 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'webdav_pwd_instruction_success'),
true);
2133 $this->showPasswordInstructionObject(
false);
2136 $form->setValuesByPost();
2137 $this->showPasswordInstructionObject();
2149 $child_ref_id = $this->std_request->getChildRefId();
2150 $parent_ref_id = $this->std_request->getParentRefId();
2152 $item_data = $this->
object->getSubItems(
false,
false, $child_ref_id);
2153 $container_view = $this->getContentGUI();
2157 if (isset($this->
object->items[
"sess"])) {
2158 $sess_data = $this->
object->items[
"sess"];
2167 if (in_array($child_ref_id, $event_items)) {
2168 foreach (($sess_data) as
$id) {
2170 foreach ($items as $event_item) {
2171 if ($event_item[
"child"] == $child_ref_id) {
2173 if ($parent_ref_id > 0) {
2174 $event_item[
"parent"] = $parent_ref_id;
2176 $html = $container_view->renderItem($event_item);
2184 foreach (($this->
object->items[
"_all"] ?? []) as
$id) {
2185 if (
$id[
"child"] == $child_ref_id) {
2186 $html = $container_view->renderItem(
$id);
2195 echo $tpl->getOnLoadCodeForAsynch();
2204 $lng->loadLanguageModule($this->
object->getType());
2207 $form->setFormAction($this->
ctrl->getFormAction($this,
"update"));
2208 $form->setTitle($this->
lng->txt($this->object->getType() .
"_edit"));
2210 $this->initFormTitleDescription($form);
2212 $this->initEditCustomForm($form);
2214 $form->addCommandButton(
"update", $this->
lng->txt(
"save"));
2225 if ($this->getCreationMode() ===
false) {
2227 $trans = $this->
object->getObjectTranslation();
2230 $title->setRequired(
true);
2235 if ($this->getCreationMode() ===
false && count($trans->getLanguages()) > 1) {
2236 $languages = $this->domain->metadata()->getLOMLanguagesForSelectInputs();
2238 $this->
lng->txt(
"language") .
": " . $languages[$trans->getDefaultLanguage()] .
2239 ' <a href="' . $this->ctrl->getLinkTargetByClass(TranslationGUI::class,
"") .
2240 '">» ' . $this->lng->txt(
"obj_more_translations") .
'</a>'
2251 if ($this->getCreationMode() ===
false) {
2252 $title->setValue($trans->getDefaultTitle());
2253 $desc->setValue($trans->getDefaultDescription());
2262 array $a_sorting_settings
2269 $sort_inherit->setTitle(
2270 $this->
lng->txt(
'sort_inherit_prefix') .
2273 $this->object->getId()
2278 $sort_inherit->setInfo($this->
lng->txt(
'sorting_info_inherit'));
2279 $sort->addOption($sort_inherit);
2283 $this->
lng->txt(
'sorting_title_header'),
2286 $sort_title->setInfo($this->
lng->txt(
'sorting_info_title'));
2288 $this->initSortingDirectionForm($settings, $sort_title,
'title');
2289 $sort->addOption($sort_title);
2293 $this->
lng->txt(
'sorting_creation_header'),
2296 $sort_activation->setInfo($this->
lng->txt(
'sorting_creation_info'));
2297 $this->initSortingDirectionForm($settings, $sort_activation,
'creation');
2298 $sort->addOption($sort_activation);
2302 $sort_activation->setInfo($this->
lng->txt(
'crs_sort_timing_info'));
2303 $this->initSortingDirectionForm($settings, $sort_activation,
'activation');
2304 $sort->addOption($sort_activation);
2308 $this->
lng->txt(
'sorting_manual_header'),
2311 $sort_manual->setInfo($this->
lng->txt(
'sorting_info_manual'));
2312 $this->initManualSortingOptionForm($settings, $sort_manual,
"manual", $a_sorting_settings);
2313 $sort->addOption($sort_manual);
2317 if (in_array($settings->getSortMode(), $a_sorting_settings)) {
2318 $sort->setValue((
string) $settings->getSortMode());
2335 $item_list->setInfo($this->
lng->txt(
'cont_item_list_info'));
2336 $lpres->addOption($item_list);
2339 $tile_view->setInfo($this->
lng->txt(
'cont_tile_view_info'));
2340 $lpres->addOption($tile_view);
2345 foreach ($this->
object->getTileSizes() as $key => $txt) {
2347 $si->addOption($op);
2349 $tile_view->addSubItem($si);
2365 $val = ($form->
getInput(
'list_presentation') ===
"tile")
2372 (
string) ((
int) $form->
getInput(
'tile_size'))
2384 if ($a_prefix ===
'manual') {
2385 $txt = $this->
lng->txt(
'sorting_new_items_direction');
2387 $txt = $this->
lng->txt(
'sorting_direction');
2391 $direction->setValue((
string) $sorting_settings->getSortDirection());
2392 $direction->setRequired(
true);
2396 $this->
lng->txt(
'sorting_asc'),
2399 $direction->addOption($asc);
2403 $this->
lng->txt(
'sorting_desc'),
2406 $direction->addOption($desc);
2408 $element->addSubItem($direction);
2420 array $a_sorting_settings
2423 $this->
lng->txt(
'sorting_new_items_position'),
2424 $a_prefix .
'_new_items_position'
2427 $position->setRequired(
true);
2431 $this->
lng->txt(
'sorting_new_items_at_top'),
2435 $position->addOption($new_top);
2439 $this->
lng->txt(
'sorting_new_items_at_bottom'),
2443 $position->addOption($new_bottom);
2447 $order =
new ilRadioGroupInputGUI($this->
lng->txt(
'sorting_new_items_order'), $a_prefix .
'_new_items_order');
2449 $order->setRequired(
true);
2454 $this->
lng->txt(
'sorting_title_header'),
2458 $order->addOption($new_title);
2464 $this->
lng->txt(
'sorting_creation_header'),
2468 $order->addOption($new_creation);
2474 $this->
lng->txt(
'crs_sort_activation'),
2478 $order->addOption($new_activation);
2483 $this->initSortingDirectionForm($settings, $element,
'manual');
2493 switch ($form->
getInput(
'sorting')) {
2518 $this->checkPermission(
"write");
2521 $this->tabs_gui->activateTab(
'trash');
2523 $this->
lng->loadLanguageModule(
'cont');
2524 $tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'cont_trash_general_usage'));
2527 $trash_table->init();
2528 $trash_table->parse();
2530 $trash_table->setFilterCommand(
'trashApplyFilter');
2531 $trash_table->setResetCommand(
'trashResetFilter');
2533 $tpl->setContent($trash_table->getHTML());
2538 $this->trashHandleFilter(
true,
false);
2543 $this->trashHandleFilter(
false,
true);
2549 $trash_table->init();
2550 $trash_table->resetOffset();
2551 if ($action_reset) {
2552 $trash_table->resetFilter();
2554 if ($action_apply) {
2555 $trash_table->writeFilterToSession();
2557 $this->trashObject();
2562 $this->checkPermission(
"write");
2564 $ru->removeObjectsFromSystem($this->std_request->getTrashIds());
2565 $this->
ctrl->redirect($this,
"trash");
2570 $this->tabs_gui->activateTab(
'trash');
2573 $ru->restoreToNewLocation();
2582 $ru->restoreObjects(
2583 $this->requested_ref_id,
2584 $this->std_request->getTrashIds()
2586 $this->
ctrl->redirect($this,
"trash");
2592 $this->checkPermission(
"write");
2593 if (count($this->std_request->getTrashIds()) == 0) {
2594 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"no_checkbox"),
true);
2595 $this->
ctrl->redirect($this,
"trash");
2599 $ru->confirmRemoveFromSystemObject($this->std_request->getTrashIds());
2609 $exp->setTypeWhiteList([
"root",
"cat",
"grp",
"crs",
"fold"]);
2613 if (in_array($this->clipboard->getCmd(), [
"link",
"cut"])) {
2614 $lso_types = array_keys($this->obj_definition->getSubObjects(
'lso'));
2615 $refs = $this->clipboard->getRefIds();
2617 foreach ($refs as $item_ref_id) {
2619 if (!in_array($type, $lso_types)) {
2624 $whitelist = $exp->getTypeWhiteList();
2625 $whitelist[] =
'lso';
2626 $exp->setTypeWhiteList($whitelist);
2630 if ($cmd ===
"link") {
2631 $exp->setSelectMode(
"nodes",
true);
2633 $exp->setSelectMode(
"nodes[]",
false);
2640 $this->
ctrl->setReturn($this,
"");
2651 if ($this->isActiveOrdering() || $this->
ctrl->getCmd() ===
"editOrder") {
2655 $filter_service = $this->container_filter_service;
2656 $request =
$DIC->http()->request();
2658 $filter = $filter_service->util()->getFilterForRefId(
2660 $DIC->ctrl()->getLinkTarget($this,
"render",
"",
true),
2661 $this->isActiveAdministrationPanel()
2664 $filter_data =
$DIC->uiService()->filter()->getData($filter);
2666 $this->container_user_filter = $filter_service->userFilter($filter_data);
2667 $this->ui_filter = $filter;
2673 if (!is_null($this->ui_filter)) {
2676 $main_tpl = $this->tpl;
2677 $main_tpl->setFilter(
$renderer->render($this->ui_filter));
2679 $this->object->getId(),
2680 "filter_show_empty",
2683 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_filter_empty"));
2690 if ($this->checkPermissionBool(
"visible,read")) {
2691 $this->tabs_gui->addTab(
2693 $this->
lng->txt(
'view'),
2694 $this->ctrl->getLinkTarget($this,
'view')
2699 $this->tabs_gui->addTab(
2701 $this->
lng->txt(
'trash'),
2702 $this->ctrl->getLinkTarget($this,
'trash')
2705 if ($this->checkPermissionBool(
"edit_permission")) {
2706 $this->tabs_gui->addTab(
2708 $this->
lng->txt(
'perm_settings'),
2709 $this->ctrl->getLinkTargetByClass(
2722 $ctrl = $this->ctrl;
2724 $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()
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'))