66 bool $a_call_by_reference =
true,
67 bool $a_prepare_output =
true
72 $this->
lng = $DIC->language();
73 $this->tpl =
$DIC[
"tpl"];
74 $this->
ctrl = $DIC->ctrl();
75 $this->
tabs = $DIC->tabs();
77 $this->
user = $DIC->user();
78 $this->
access = $DIC->access();
79 $this->tree =
$DIC->repositoryTree();
80 $this->
error = $DIC[
"ilErr"];
81 $this->obj_definition =
$DIC[
"objDefinition"];
82 $this->rbacadmin =
$DIC->rbac()->admin();
83 $this->rbacreview =
$DIC->rbac()->review();
84 $this->log =
$DIC[
"ilLog"];
85 $this->obj_data_cache =
$DIC[
"ilObjDataCache"];
86 $this->
toolbar = $DIC->toolbar();
87 $this->app_event_handler =
$DIC[
"ilAppEventHandler"];
88 $this->
ui = $DIC->ui();
89 $this->global_screen =
$DIC->globalScreen();
90 $this->component_factory =
$DIC[
"component.factory"];
103 $this->clipboard =
$DIC
108 $this->std_request =
$DIC
113 $this->requested_redirectSource = $this->std_request->getRedirectSource();
114 $this->view_manager =
$DIC
123 $cs =
$DIC->contentStyle();
124 $this->content_style_gui = $cs->gui();
125 $this->content_style_domain = $cs->domain();
132 $next_class = $this->
ctrl->getNextClass();
133 $cmd = $this->
ctrl->getCmd(
"render");
135 switch ($next_class) {
137 case "ilcontainerpagegui":
138 if ($this->requested_redirectSource !==
"ilinternallinkgui") {
156 $values = parent::getEditFormValues();
158 $values[
'didactic_type'] =
172 if ($new_tpl_id !== $current_tpl_id) {
174 $this->
ctrl->setReturn($this,
'edit');
175 $this->
ctrl->setCmdClass(
'ildidactictemplategui');
176 $this->
ctrl->setCmd(
'confirmTemplateSwitch');
178 $this->
ctrl->forwardCommand($dtpl_gui);
181 parent::afterUpdate();
191 if (in_array($cmd, [
"displayMediaFullscreen",
"downloadFile",
"displayMedia"])) {
197 $ilTabs->clearTargets();
199 if ($this->requested_redirectSource ===
"ilinternallinkgui") {
203 $ilTabs->setBackTarget(
205 $this->ctrl->getLinkTargetByClass(
"ilcontainerpagegui",
"edit")
211 $this->content_style_gui->addCss($this->tpl, $this->
object->getRefId());
222 $new_page_object->setParentId($this->
object->getId());
223 $new_page_object->setId($this->
object->getId());
224 $new_page_object->createFromXML();
229 $style = $this->content_style_domain->styleForRefId($this->
object->getRefId());
230 $page_gui->setStyleId(
231 $style->getEffectiveStyleId()
234 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
235 $page_gui->setFileDownloadLink(
"");
237 $page_gui->setPresentationTitle(
"");
238 $page_gui->setTemplateOutput(
false);
241 $page_gui->setTabHook($this,
"addPageTabs");
243 return $this->
ctrl->forwardCommand($page_gui);
253 $ilCtrl->getLinkTargetByClass(
"ilObjectContentStyleSettingsGUI",
''),
254 "editStyleProperties",
255 "ilobjectcontentstylesettingsgui"
264 if (!
$ilSetting->get(
"enable_cat_page_edit") || $this->object->filteredSubtree()) {
275 $this->content_style_gui->addCss($this->tpl, $this->
object->getRefId());
276 $this->tpl->setCurrentBlock(
"SyntaxStyle");
277 $this->tpl->setVariable(
278 "LOCATION_SYNTAX_STYLESHEET",
281 $this->tpl->parseCurrentBlock();
285 $lang = $ot->getEffectiveContentLang(
$ilUser->getCurrentLanguage(),
"cont");
287 $style = $this->content_style_domain->styleForRefId($this->
object->getRefId());
288 $page_gui->setStyleId($style->getEffectiveStyleId());
290 $page_gui->setPresentationTitle(
"");
291 $page_gui->setTemplateOutput(
false);
292 $page_gui->setHeader(
"");
293 $ret = $page_gui->showPage();
303 if (parent::prepareOutput($show_subobjects)) {
314 $this->tpl->setTitle($this->
object->getTitle(),
true);
316 $this->tpl->setTitle($this->
object->getTitle());
317 $this->tpl->setDescription($this->
object->getLongDescription());
321 $this->tpl->setTitleIcon($icon, $this->
lng->txt(
"obj_" . $this->object->getType()));
324 $lgui->initItem($this->
object->getRefId(), $this->object->getId(), $this->object->getType());
325 $this->tpl->setAlertProperties($lgui->getAlertProperties());
341 if ($this->
object->filteredSubtree()) {
344 switch ($view_mode) {
366 return $container_view;
382 $ilTabs->activateSubTab(
"manage");
384 $ilTabs->activateSubTab(
"view_content");
387 $container_view->setOutput();
389 $this->adminCommands = $container_view->adminCommands;
391 $is_container_cmd = strtolower($this->std_request->getCmdClass()) === strtolower(get_class($this))
392 || ($this->std_request->getCmdClass() ===
"");
396 if ($is_container_cmd) {
400 if (is_object($this->
object) &&
402 $this->rbacsystem->checkAccess(
"write", $this->object->getRefId())
404 if (
$ilSetting->get(
"enable_cat_page_edit")) {
410 $lng->
txt(
"cntr_text_media_editor"),
411 $ilCtrl->getLinkTarget($this,
"editPageFrame")
423 if ($this->requested_ref_id > 1 &&
$ilSetting->get(
"rep_tree_synchronize")) {
424 $ilCtrl->setParameter($this,
"active_node", $this->requested_ref_id);
439 echo $container_view->getSingleTypeBlockAsynch(
440 $this->std_request->getType()
457 $main_tpl =
$DIC->ui()->mainTemplate();
461 if ($this->clipboard->hasEntries() && !$this->edit_order) {
463 $main_tpl->setPageFormAction($this->
ctrl->getFormAction($this));
467 $this->
ctrl->setParameter($this,
"type",
"");
468 $this->
ctrl->setParameter($this,
"item_ref_id",
"");
471 $this->
ui->factory()->button()->standard(
472 $this->lng->txt(
'paste_clipboard_items'),
473 $this->ctrl->getLinkTargetByClass([ilRepositoryGUI::class, static::class],
'paste')
478 $this->
ui->factory()->button()->standard(
479 $this->lng->txt(
'clear_clipboard'),
480 $this->ctrl->getLinkTargetByClass([ilRepositoryGUI::class, static::class],
'clear')
484 $main_tpl->addAdminPanelToolbar(
$toolbar,
true,
false);
487 $main_tpl->setPageFormAction($this->
ctrl->getFormAction($this));
491 $this->
ctrl->setParameter($this,
"type",
"");
492 $this->
ctrl->setParameter($this,
"item_ref_id",
"");
494 if ($this->
object->gotItems()) {
500 $this->
lng->txt(
'delete_selected_items'),
504 $this->
lng->txt(
'move_selected_items'),
508 $this->
lng->txt(
'copy_selected_items'),
512 $this->
lng->txt(
'link_selected_items'),
517 if ((
bool) $folder_set->get(
'enable_multi_download') ===
true) {
520 $this->
lng->txt(
'download_selected_items'),
525 if ($this->
object->getType() ===
'crs' || $this->object->getType() ===
'grp') {
526 if ($this->
object->gotItems()) {
531 $this->
lng->txt(
'cntr_adopt_content'),
532 $this->ctrl->getLinkTargetByClass(
539 $main_tpl->addAdminPanelToolbar(
541 $this->
object->gotItems() && !$this->clipboard->hasEntries(),
542 $this->object->gotItems() && !$this->clipboard->hasEntries()
546 if ($this->
object->gotItems()) {
547 $main_tpl->setPageFormAction($this->
ctrl->getFormAction($this));
549 } elseif ($this->edit_order) {
550 if ($this->
object->gotItems() && $ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
553 $main_tpl->setPageFormAction($this->
ctrl->getFormAction($this));
556 $this->
ctrl->setParameter($this,
"type",
"");
557 $this->
ctrl->setParameter($this,
"item_ref_id",
"");
560 $this->
lng->txt(
'sorting_save'),
564 $main_tpl->addAdminPanelToolbar(
$toolbar,
true,
false);
574 $num_files = $this->tree->getChildsByType(
$ref_id,
"file");
575 $num_folders = $this->tree->getChildsByType(
$ref_id,
"fold");
576 if (count($num_files) > 0 || count($num_folders) > 0) {
578 $GLOBALS[
'tpl']->setPageFormAction($this->
ctrl->getFormAction($this));
581 $this->
ctrl->setParameter($this,
"type",
"");
582 $this->
ctrl->setParameter($this,
"item_ref_id",
"");
585 $this->
lng->txt(
'download_selected_items'),
589 $GLOBALS[
'tpl']->addAdminPanelToolbar(
591 $this->
object->gotItems(),
592 $this->object->gotItems()
595 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'msg_no_downloadable_objects'),
true);
608 $this->object->getRefId(),
616 $this->
ctrl->redirectByClass([static::class,
"ilcontainerpagegui"],
"edit");
621 $this->
ctrl->redirect($this,
"");
632 "tpl.container_link_help.html",
658 foreach ($childs as $child) {
659 if (in_array($child[
"type"], [
"lm",
"sahs",
"htlm"])) {
662 $cnt[$child[
"type"]]++;
668 foreach ($type_ordering as
$type) {
670 if (
$type !==
"lres") {
674 " (" . ((
int) $cnt[
$type]) .
")"
680 " (" . ((
int) $cnt[
"lres"]) .
")"
692 $this->adminCommands =
false;
698 bool $a_show_image =
true
700 $icon =
ilUtil::getImagePath(
"icon_" . $a_type .
".svg");
701 $title = $this->
lng->txt(
"objs_" . $a_type);
711 $a_tpl->
setVariable(
"BLOCK_HEADER_CONTENT", $title);
716 public function addStandardRow(
719 int $a_item_ref_id =
null,
720 int $a_item_obj_id =
null,
721 string $a_image_type =
""
726 if (
$ilSetting->get(
"icon_position_in_lists") ===
"item_rows") {
728 $alt = $this->
lng->txt(
"obj_" . $a_image_type);
733 $customIconFactory =
$DIC[
'object.customicons.factory'];
734 $customIcon = $customIconFactory->getPresenterByObjId($a_item_obj_id, $a_image_type);
736 if ($customIcon->exists()) {
737 $icon = $customIcon->getFullPath();
748 if ($this->isActiveAdministrationPanel()) {
754 if ($this->isActiveAdministrationPanel() &&
759 $a_tpl->
setVariable(
'POSITION', sprintf(
'%.1f', $this->current_position++));
776 $type = $this->
lng->txt(
"obj_" . $a_type);
777 $a_message = str_replace(
"[type]",
$type, $a_message);
794 if (!$this->isActiveAdministrationPanel()
795 || strtolower($this->
ctrl->getCmdClass()) !==
"ilcontainerpagegui") {
799 $lng->loadLanguageModule(
"content");
804 $this->tabs_gui->setBackTarget(
805 $this->
lng->txt(
"obj_cat"),
806 $this->ctrl->getLinkTarget($this,
""),
810 $this->tabs_gui->addTarget(
812 $this->
ctrl->getLinkTargetByClass(
"ilcontainerpagegui",
"view"),
824 bool $a_include_view =
true
826 $ilTabs = $this->
tabs;
828 $ilCtrl = $this->ctrl;
831 if (!is_object($this->
object)) {
835 if ($a_include_view && $this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
836 if (!$this->isActiveAdministrationPanel()) {
837 $ilTabs->addSubTab(
"view_content",
$lng->txt(
"view"), $ilCtrl->getLinkTargetByClass(static::class,
"view"));
842 $ilCtrl->getLinkTarget($this,
"disableAdministrationPanel")
849 $this->adminCommands ||
850 (is_object($this->
object) &&
851 ($this->rbacsystem->checkAccess(
"write", $this->object->getRefId())))
853 (is_object($this->
object) &&
854 ($this->
object->getHiddenFilesFound())) ||
855 $this->clipboard->hasEntries()
858 if ($this->isActiveAdministrationPanel()) {
859 $ilTabs->addSubTab(
"manage",
$lng->txt(
"cntr_manage"), $ilCtrl->getLinkTarget($this,
""));
863 $lng->txt(
"cntr_manage"),
864 $ilCtrl->getLinkTarget($this,
"enableAdministrationPanel")
868 if (is_object($this->
object) &&
870 $this->rbacsystem->checkAccess(
"write", $this->object->getRefId())
873 $ilTabs->addSubTab(
"ordering",
$lng->txt(
"cntr_ordering"), $ilCtrl->getLinkTarget($this,
"editOrder"));
879 $rbacsystem = $this->rbacsystem;
880 $ilCtrl = $this->ctrl;
883 if ($rbacsystem->
checkAccess(
'edit_permission', $this->ref_id)) {
884 $this->tabs_gui->addTarget(
886 $this->
ctrl->getLinkTargetByClass([get_class($this),
'ilpermissiongui'],
"perm"),
887 [
"perm",
"info",
"owner"],
890 if ($ilCtrl->getNextClass() ===
"ilpermissiongui") {
891 $this->tabs_gui->activateTab(
"perm_settings");
896 if (strtolower($this->std_request->getBaseClass()) ===
"ilrepositorygui" &&
897 $this->clipboard->hasEntries()) {
898 $this->tabs_gui->addTarget(
900 $this->
ctrl->getLinkTarget($this,
"clipboard"),
914 $this->view_manager->setAdminView();
915 $this->
ctrl->redirect($this,
"render");
920 $this->view_manager->setContentView();
921 $this->
ctrl->redirect($this,
"render");
926 $ilTabs = $this->tabs;
927 $this->edit_order =
true;
928 $this->view_manager->setContentView();
929 $this->renderObject();
931 $ilTabs->activateSubTab(
"ordering");
937 return $this->edit_order;
942 if ($this->isActiveOrdering()) {
954 $this->multi_download_enabled =
true;
955 $this->renderObject();
960 return $this->multi_download_enabled;
969 $rbacsystem = $this->rbacsystem;
970 $ilCtrl = $this->ctrl;
973 $ids = $this->std_request->getSelectedIds();
976 if (count($ids) === 0) {
977 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
978 $this->
ctrl->redirect($this,
"");
984 $node_data = $this->tree->getNodeData(
$ref_id);
985 $subtree_nodes = $this->tree->getSubTree($node_data);
987 $all_node_data[] = $node_data;
988 $all_subtree_nodes[] = $subtree_nodes;
991 foreach ($subtree_nodes as $node) {
992 if ($node[
'type'] ===
'rolf') {
996 if (!$rbacsystem->
checkAccess(
'delete', $node[
"ref_id"])) {
997 $no_cut[] = $node[
"ref_id"];
1002 if (count($no_cut)) {
1004 foreach ($no_cut as $cut_id) {
1008 $this->
lng->txt(
"msg_no_perm_cut") .
" " . implode(
',', $titles),
1012 $this->clipboard->setParent($this->requested_ref_id);
1013 $this->clipboard->setCmd($ilCtrl->getCmd());
1014 $this->clipboard->setRefIds($this->std_request->getSelectedIds());
1016 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"msg_cut_clipboard"),
true);
1018 $this->initAndDisplayMoveIntoObjectObject();
1027 $rbacsystem = $this->rbacsystem;
1028 $ilCtrl = $this->ctrl;
1029 $objDefinition = $this->obj_definition;
1034 $ids = $this->std_request->getSelectedIds();
1036 if (count($ids) === 0) {
1037 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1038 $this->
ctrl->redirect($this,
"");
1045 $node_data = $this->tree->getNodeData(
$ref_id);
1048 if ($objDefinition->isContainer($node_data[
"type"])) {
1052 $subtree_nodes = $this->tree->getSubTree($node_data);
1054 $all_node_data[] = $node_data;
1055 $all_subtree_nodes[] = $subtree_nodes;
1058 foreach ($subtree_nodes as $node) {
1059 if ($node[
'type'] ===
'rolf') {
1063 if (!$rbacsystem->
checkAccess(
'visible,read', $node[
"ref_id"])) {
1064 $no_copy[] = $node[
"ref_id"];
1069 if ($containers > 0 && count($this->std_request->getSelectedIds()) > 1) {
1070 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cntr_container_only_on_their_own"),
true);
1071 $this->
ctrl->redirect($this,
"");
1075 if (is_array($no_copy) && count($no_copy)) {
1077 foreach ($no_copy as $copy_id) {
1080 $this->tpl->setOnScreenMessage(
1082 $this->
lng->txt(
"msg_no_perm_copy") .
" " . implode(
',', $titles),
1085 $this->
ctrl->redirect($this,
"");
1089 $ids = $this->std_request->getSelectedIds();
1090 if (count($ids) === 1) {
1091 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_id", $ids[0]);
1093 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_ids", implode(
"_", $ids));
1095 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"initTargetSelection");
1097 $this->clipboard->setParent($this->requested_ref_id);
1098 $this->clipboard->setCmd($ilCtrl->getCmd());
1099 $this->clipboard->setRefIds($ids);
1101 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"msg_copy_clipboard"),
true);
1103 $this->initAndDisplayCopyIntoMultipleObjectsObject();
1115 $initiated_by_folder_action =
false;
1117 $ids = $this->std_request->getSelectedIds();
1119 if (count($ids) === 0) {
1121 $object_type = $object->getType();
1122 if ($object_type ===
"fold") {
1124 $initiated_by_folder_action =
true;
1126 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1127 $this->
ctrl->redirect($this,
"");
1134 $initiated_by_folder_action
1137 $download_job->setBucketTitle($this->getBucketTitle());
1138 if ($download_job->run()) {
1139 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_bt_download_started'),
true);
1141 $GLOBALS[
'DIC']->ctrl()->redirect($this);
1155 $rbacsystem = $this->rbacsystem;
1156 $ilCtrl = $this->ctrl;
1162 $ids = $this->std_request->getSelectedIds();
1164 if (count($ids) === 0) {
1165 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1166 $this->
ctrl->redirect($this,
"");
1177 if (!$this->obj_definition->allowLink($object->getType())) {
1178 $no_link[] = $object->getType();
1183 if ($no_cut !== []) {
1184 $this->tpl->setOnScreenMessage(
1186 $this->
lng->txt(
"msg_no_perm_link") .
" " . implode(
',', $no_cut),
1189 $this->
ctrl->redirect($this,
"");
1192 if ($no_link !== []) {
1194 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_obj_no_link'),
true);
1195 $this->
ctrl->redirect($this,
"");
1198 $this->clipboard->setParent($this->requested_ref_id);
1199 $this->clipboard->setCmd($ilCtrl->getCmd());
1200 $this->clipboard->setRefIds($ids);
1203 if (count($this->clipboard->getRefIds()) === 1) {
1206 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"msg_link_clipboard_" . $suffix),
true);
1208 $this->initAndDisplayLinkIntoMultipleObjectsObject();
1216 $this->clipboard->clear();
1221 if ($this->
ctrl->getCmd() ===
"clear") {
1222 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_clear_clipboard"),
true);
1224 $this->
ctrl->redirect($this,
'render');
1230 $rbacsystem = $this->rbacsystem;
1231 $rbacadmin = $this->rbacadmin;
1232 $rbacreview = $this->rbacreview;
1234 $tree = $this->tree;
1235 $ilObjDataCache = $this->obj_data_cache;
1243 $not_allowed_subobject = [];
1246 $command = $this->clipboard->getCmd();
1247 if (!in_array($command, [
'cut',
'link',
'copy'])) {
1248 $message = __METHOD__ .
": cmd was neither 'cut', 'link' nor 'copy'; may be a hack attempt!";
1252 $nodes = $this->std_request->getNodes();
1254 if (count($nodes) === 0) {
1255 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_at_least_one_object'));
1260 $this->showPasteTreeObject();
1267 $folder_objects_cache = [];
1268 foreach ($this->clipboard->getRefIds() as
$ref_id) {
1270 $current_parent_id = $tree->getParentId($obj_data->getRefId());
1272 foreach ($nodes as $folder_ref_id) {
1273 if (!array_key_exists($folder_ref_id, $folder_objects_cache)) {
1278 if (!$rbacsystem->
checkAccess(
'create', $folder_ref_id, $obj_data->getType())) {
1279 $no_paste[] = sprintf(
1280 $this->
lng->txt(
'msg_no_perm_paste_object_in_folder'),
1281 $obj_data->getTitle() .
' [' . $obj_data->getRefId() .
']',
1282 $folder_objects_cache[$folder_ref_id]->getTitle(
1283 ) .
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() .
']'
1288 if ($folder_ref_id == $current_parent_id) {
1289 $exists[] = sprintf(
1290 $this->
lng->txt(
'msg_obj_exists_in_folder'),
1291 $obj_data->getTitle() .
' [' . $obj_data->getRefId() .
']',
1292 $folder_objects_cache[$folder_ref_id]->getTitle(
1293 ) .
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() .
']'
1298 if (
$ref_id == $folder_ref_id || $tree->isGrandChild(
$ref_id, $folder_ref_id)) {
1299 $is_child[] = sprintf(
1300 $this->
lng->txt(
'msg_paste_object_not_in_itself'),
1301 $obj_data->getTitle() .
' [' . $obj_data->getRefId() .
']'
1306 if (!array_key_exists(
1307 $obj_data->getType(),
1308 $folder_objects_cache[$folder_ref_id]->getPossibleSubObjects()
1310 $not_allowed_subobject[] = sprintf(
1311 $this->
lng->txt(
'msg_obj_may_not_contain_objects_of_type'),
1312 $folder_objects_cache[$folder_ref_id]->getTitle(
1313 ) .
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() .
']',
1314 $lng->txt(
'obj_' . $obj_data->getType())
1323 if ($command !==
"copy" && count($exists)) {
1324 $error .= implode(
'<br />', $exists);
1327 if (count($is_child)) {
1328 $error .= $error !==
'' ?
'<br />' :
'';
1329 $error .= implode(
'<br />', $is_child);
1332 if (count($not_allowed_subobject)) {
1333 $error .= $error !==
'' ?
'<br />' :
'';
1334 $error .= implode(
'<br />', $not_allowed_subobject);
1337 if (count($no_paste)) {
1338 $error .= $error !==
'' ?
'<br />' :
'';
1339 $error .= implode(
'<br />', $no_paste);
1342 if ($error !==
'') {
1343 $this->tpl->setOnScreenMessage(
'failure', $error);
1348 $this->showPasteTreeObject();
1355 $ilLog->write(__METHOD__ .
", cmd: " . $command);
1361 $ref_ids = $this->clipboard->getRefIds();
1362 $this->clipboard->clear();
1366 if ($command ===
'copy') {
1367 foreach ($nodes as $folder_ref_id) {
1368 foreach ($ref_ids as
$ref_id) {
1371 $oldNode_data = $tree->getNodeData(
$ref_id);
1372 if ($oldNode_data[
'parent'] == $folder_ref_id) {
1374 $newRef = $this->cloneNodes(
$ref_id, $folder_ref_id, $refIdMapping, $newTitle);
1376 $newRef = $this->cloneNodes(
$ref_id, $folder_ref_id, $refIdMapping,
null);
1380 $old_parent_data = $tree->getParentNodeData(
$ref_id);
1381 $newNode_data = $tree->getNodeData($newRef);
1383 $oldNode_data[
'type'],
1385 $oldNode_data[
'obj_id'],
1389 $newNode_data[
'obj_id'],
1392 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1399 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_cloned'),
true);
1403 if ($command ===
'cut') {
1404 foreach ($nodes as $folder_ref_id) {
1405 foreach ($ref_ids as
$ref_id) {
1407 $old_parent = $tree->getParentId(
$ref_id);
1408 $tree->moveTree(
$ref_id, $folder_ref_id);
1414 $node_data = $tree->getNodeData(
$ref_id);
1415 $old_parent_data = $tree->getNodeData($old_parent);
1417 $node_data[
'obj_id'],
1420 $old_parent_data[
'obj_id']
1423 $node_data[
'obj_id'],
1426 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1436 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_cut_copied'),
true);
1440 if ($command ===
'link') {
1442 $linked_to_folders = [];
1446 foreach ($nodes as $folder_ref_id) {
1447 $linked_to_folders[$folder_ref_id] = $ilObjDataCache->lookupTitle(
1448 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1451 foreach ($ref_ids as
$ref_id) {
1453 $top_node = $tree->getNodeData(
$ref_id);
1456 $subnodes[
$ref_id] = $tree->getSubTree($top_node);
1460 foreach ($subnodes as
$key => $subnode) {
1463 $new_ref_id = $obj_data->createReference();
1464 $obj_data->putInTree($folder_ref_id);
1465 $obj_data->setPermissions($folder_ref_id);
1468 if ($rbac_log_active) {
1475 $node_data = $tree->getNodeData($new_ref_id);
1477 $node_data[
'obj_id'],
1480 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1486 $ilLog->write(__METHOD__ .
', link finished');
1490 if (count($linked_to_folders)) {
1491 foreach ($linked_to_folders as
$ref_id => $title) {
1497 if (count($ref_ids) === 1) {
1501 $mbox = $ui->
factory()->messageBox()->success(
1502 $this->
lng->txt(
'mgs_objects_linked_to_the_following_folders_' . $suffix)
1504 ->withLinks($links);
1506 $this->tpl->setOnScreenMessage(
'success', $ui->
renderer()->render($mbox),
true);
1510 $this->clearObject();
1512 $this->
ctrl->returnToParent($this);
1517 $this->showPasteTreeObject();
1522 $ilTabs = $this->tabs;
1525 $ilTabs->setTabActive(
'view_content');
1527 if (!in_array($this->clipboard->getCmd(), [
'link',
'copy',
'cut'])) {
1528 $message = __METHOD__ .
": Unknown action.";
1531 $cmd = $this->clipboard->getCmd();
1534 $exp = $this->getTreeSelectorGUI($cmd);
1535 if ($exp->handleCommand()) {
1538 $output = $exp->getHTML();
1540 $txt_var = ($cmd ===
"copy")
1546 $t->setFormAction($this->
ctrl->getFormAction($this,
"performPasteIntoMultipleObjects"));
1549 $b->setCaption($txt_var);
1550 $b->setCommand(
"performPasteIntoMultipleObjects");
1553 $t->addStickyItem(
$b);
1556 $this->
lng->loadLanguageModule(
'obj');
1557 $t->addFormButton($this->
lng->txt(
"obj_insert_into_clipboard"),
"keepObjectsInClipboard");
1559 $t->addFormButton($this->
lng->txt(
"cancel"),
"cancelMoveLink");
1560 $t->setCloseFormTag(
false);
1562 $output = $t->getHTML() . $output;
1564 $t->setCloseFormTag(
true);
1565 $t->setOpenFormTag(
false);
1566 $output .=
"<br />" . $t->getHTML();
1568 $this->tpl->setContent($output);
1577 $ilCtrl = $this->ctrl;
1579 $this->clipboard->clear();
1580 $ilCtrl->returnToParent($this);
1585 $ilCtrl = $this->ctrl;
1587 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"obj_inserted_clipboard"),
true);
1588 $ilCtrl->returnToParent($this);
1593 $this->showPasteTreeObject();
1598 $this->showPasteTreeObject();
1607 $rbacsystem = $this->rbacsystem;
1608 $rbacadmin = $this->rbacadmin;
1610 $tree = $this->tree;
1612 $ilCtrl = $this->ctrl;
1618 $not_allowed_subobject = [];
1621 if (!in_array($this->clipboard->getCmd(), [
"cut",
"link",
"copy"])) {
1624 ) .
"::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
1629 foreach ($this->clipboard->getRefIds() as
$ref_id) {
1633 if (!$rbacsystem->
checkAccess(
'create', $this->object->getRefId(), $obj_data->getType())) {
1635 $no_paste_titles[] = $obj_data->getTitle();
1639 if ($this->
object->getRefId() === $this->tree->getParentId($obj_data->getRefId())) {
1645 if ($this->tree->isGrandChild(
$ref_id, $this->object->getRefId())) {
1654 $obj_type = $obj_data->getType();
1656 if (!array_key_exists($obj_type, $this->
object->getPossibleSubObjects())) {
1657 $not_allowed_subobject[] = $obj_data->getType();
1664 if (count($exists) > 0 && $this->clipboard->getCmd() !==
"copy") {
1666 $ilErr->raiseError($this->
lng->txt(
"msg_obj_exists"),
$ilErr->MESSAGE);
1669 if (count($is_child) > 0) {
1671 $this->
lng->txt(
"msg_not_in_itself") .
" " . implode(
',', $is_child),
1676 if (count($not_allowed_subobject) > 0) {
1678 $this->
lng->txt(
"msg_may_not_contain") .
" " . implode(
',', $not_allowed_subobject),
1683 if (count($no_paste) > 0) {
1685 $this->
lng->txt(
"msg_no_perm_paste") .
" " .
1686 implode(
',', $no_paste),
1692 $ilLog->write(
"ilObjectGUI::pasteObject(), cmd: " . $this->clipboard->getCmd());
1698 $ref_ids = $this->clipboard->getRefIds();
1701 $last_cmd = $this->clipboard->getCmd();
1705 if ($this->clipboard->getCmd() ===
"copy") {
1706 $this->clipboard->clear();
1709 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"target", $this->
object->getRefId());
1710 if (count($ref_ids) === 1) {
1711 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_id", $ref_ids[0]);
1713 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_ids", implode(
"_", $ref_ids));
1715 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"saveTarget");
1717 $ilLog->write(
"ilObjectGUI::pasteObject(), copy finished");
1722 if ($this->clipboard->getCmd() ===
"cut") {
1723 foreach ($ref_ids as
$ref_id) {
1725 $old_parent = $tree->getParentId(
$ref_id);
1732 $node_data = $tree->getNodeData(
$ref_id);
1733 $old_parent_data = $tree->getNodeData($old_parent);
1735 $node_data[
'obj_id'],
1738 $old_parent_data[
'obj_id']
1741 $node_data[
'obj_id'],
1744 $this->object->getId()
1754 if ($this->clipboard->getCmd() ===
"link") {
1755 foreach ($ref_ids as
$ref_id) {
1757 $top_node = $this->tree->getNodeData(
$ref_id);
1760 $subnodes[
$ref_id] = $this->tree->getSubTree($top_node);
1763 foreach ($subnodes as
$key => $subnode) {
1766 $new_ref_id = $obj_data->createReference();
1767 $obj_data->putInTree($this->requested_ref_id);
1768 $obj_data->setPermissions($this->requested_ref_id);
1771 $node_data = $tree->getNodeData($new_ref_id);
1773 $node_data[
'obj_id'],
1776 $this->object->getId()
1782 $ilLog->write(
"ilObjectGUI::pasteObject(), link finished");
1787 $this->clearObject();
1789 if ($last_cmd ===
"cut") {
1790 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_cut_copied"),
true);
1792 elseif ($last_cmd ===
"copy") {
1793 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_cloned"),
true);
1794 } elseif ($last_cmd ===
'link') {
1796 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_linked"),
true);
1799 $this->
ctrl->returnToParent($this);
1807 $ilTabs = $this->tabs;
1809 $ilToolbar = $this->toolbar;
1810 $ilCtrl = $this->ctrl;
1813 $ilTabs->activateTab(
"clipboard");
1816 if (!$this->clipboard->hasEntries()) {
1817 $message = sprintf(
'%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
1818 $ilLog->write(
$message, $ilLog->FATAL);
1819 $ilErr->raiseError($this->
lng->txt(
"permission_denied"),
$ilErr->WARNING);
1823 foreach ($this->clipboard->getRefIds() as
$ref_id) {
1829 "type" => $tmp_obj->getType(),
1830 "type_txt" => $this->
lng->txt(
"obj_" . $tmp_obj->getType()),
1831 "title" => $tmp_obj->getTitle(),
1832 "cmd" => ($this->clipboard->getCmd() ===
"cut") ? $this->
lng->txt(
"move") : $this->
lng->txt(
1833 $this->clipboard->getCmd()
1836 "obj_id" => $tmp_obj->getId()
1843 $tab->setData(
$data);
1844 $tpl->setContent($tab->getHTML());
1846 if (count(
$data) > 0) {
1847 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1848 $ilToolbar->addFormButton(
1849 $lng->txt(
"insert_object_here"),
1852 $ilToolbar->addFormButton(
1853 $lng->txt(
"clear_clipboard"),
1862 if ($this->view_manager->isAdminView() &&
1863 $this->object->getRefId() &&
1864 !$this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
1868 return $this->view_manager->isAdminView();
1873 $ilAccess = $this->access;
1874 parent::setColumnSettings($column_gui);
1877 $this->
object->getSubItems($this->isActiveAdministrationPanel(),
true)
1882 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
1889 if ($this->isActiveAdministrationPanel()) {
1917 $ilCtrl = $this->ctrl;
1919 $ilAccess = $this->access;
1921 $rbacsystem = $this->rbacsystem;
1923 $new_type = $this->std_request->getNewType();
1925 $clone_source = $this->std_request->getCloneSource();
1928 $ilErr->raiseError($this->
lng->txt(
'permission_denied'));
1930 if (!$clone_source) {
1931 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
1932 $this->createObject();
1935 if (!$ilAccess->checkAccess(
'write',
'', $clone_source, $new_type)) {
1936 $ilErr->raiseError($this->
lng->txt(
'permission_denied'));
1939 $options = $this->std_request->getCopyOptions();
1941 $result = $orig->cloneAllObject(
1951 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_duplicated"),
true);
1952 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $result[
'ref_id']);
1954 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"object_copy_in_progress"),
true);
1955 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$ref_id);
1957 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
1965 $positions = $this->std_request->getPositions();
1967 $sorting->savePost($positions);
1968 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cntr_saved_sorting'),
true);
1969 $this->
ctrl->redirect($this,
"editOrder");
1981 string $newName =
null
1983 $tree = $this->tree;
1987 $newRef = $srcObj->cloneObject($dstRef)->getRefId();
1992 if (!is_null($newName)) {
1994 $newObj->setTitle($newName);
1999 $mapping[$newRef] = $srcRef;
2002 $children = $tree->getChilds($srcRef);
2003 foreach ($tree->getChilds($srcRef) as $child) {
2006 if ($child[
"type"] !==
'rolf') {
2007 $this->cloneNodes($child[
"ref_id"], $newRef, $mapping);
2008 } elseif (count($rolf = $tree->getChildsByType($newRef,
"rolf"))) {
2009 $mapping[$rolf[0][
"ref_id"]] = $child[
"ref_id"];
2040 int $a_course_ref_id
2044 $tree =
$DIC->repositoryTree();
2047 $path_arr = $tree->getPathFull($a_ref_id, $a_course_ref_id);
2049 foreach ($path_arr as
$data) {
2062 $this->content_style_gui
2063 ->redirectToObjectSettings();
2068 $ctrl = $this->ctrl;
2069 $tabs = $this->tabs;
2072 $tabs->
setBackTarget($this->
lng->txt(
'back'), $this->ctrl->getLinkTarget($page_gui,
"edit"));
2077 $ref_id = $this->std_request->getCmdRefId();
2085 "obj_id" => $obj_id,
2089 $item_list_gui->setContainerObject($this);
2091 $item_list_gui->enableComments(
true);
2092 $item_list_gui->enableNotes(
true);
2093 $item_list_gui->enableTags(
true);
2095 $this->modifyItemGUI($item_list_gui,
$data);
2096 $html = $item_list_gui->getListItemHTML(
2106 foreach ($this->component_factory->getActivePluginsInSlot(
"uihk") as
$plugin) {
2107 $gui_class =
$plugin->getUIClassInstance();
2108 $resp = $gui_class->getHTML(
"Services/Container",
"async_item_list", [
"html" => $html]);
2110 $html = $gui_class->modifyHTML($html,
$resp);
2123 $ilToolbar = $this->toolbar;
2126 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'webdav_pwd_instruction'));
2127 $this->initFormPasswordInstruction();
2131 $href = $uri_builder->getUriToMountInstructionModalByRef($this->
object->getRefId());
2134 $btn->setCaption(
'mount_webfolder');
2135 $btn->setOnClick(
"triggerWebDAVModal('$href')");
2136 $ilToolbar->addButtonInstance($btn);
2138 $tpl->setContent($this->
form->getHTML());
2147 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
2151 $ipass->setRequired(
true);
2153 $this->
form->addItem($ipass);
2154 $this->
form->addCommandButton(
"savePassword", $this->
lng->txt(
"save"));
2155 $this->
form->addCommandButton(
'cancel', $this->
lng->txt(
'cancel'));
2157 $this->
form->setTitle($this->
lng->txt(
"chg_ilias_and_webfolder_password"));
2158 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
2167 $form = $this->initFormPasswordInstruction();
2169 $ilUser->resetPassword($this->
form->getInput(
'new_password'), $this->form->getInput(
'new_password'));
2170 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'webdav_pwd_instruction_success'),
true);
2171 $this->showPasswordInstructionObject(
false);
2175 $this->showPasswordInstructionObject();
2187 $child_ref_id = $this->std_request->getChildRefId();
2188 $parent_ref_id = $this->std_request->getParentRefId();
2190 $item_data = $this->
object->getSubItems(
false,
false, $child_ref_id);
2191 $container_view = $this->getContentGUI();
2195 if (isset($this->
object->items[
"sess"])) {
2196 $sess_data = $this->
object->items[
"sess"];
2205 if (in_array($child_ref_id, $event_items)) {
2206 foreach (($sess_data) as
$id) {
2208 foreach ($items as $event_item) {
2209 if ($event_item[
"child"] == $child_ref_id) {
2211 if ($parent_ref_id > 0) {
2212 $event_item[
"parent"] = $parent_ref_id;
2214 $html = $container_view->renderItem($event_item);
2222 foreach (($this->
object->items[
"_all"] ?? []) as
$id) {
2223 if (
$id[
"child"] == $child_ref_id) {
2224 $html = $container_view->renderItem(
$id);
2233 echo
$tpl->getOnLoadCodeForAsynch();
2242 $lng->loadLanguageModule($this->
object->getType());
2246 $form->
setTitle($this->
lng->txt($this->object->getType() .
"_edit"));
2248 $this->initFormTitleDescription($form);
2250 $this->initEditCustomForm($form);
2263 if ($this->getCreationMode() ===
false) {
2265 $trans = $this->
object->getObjectTranslation();
2268 $title->setRequired(
true);
2273 if ($this->getCreationMode() ===
false && count($trans->getLanguages()) > 1) {
2276 $this->
lng->txt(
"language") .
": " . $languages[$trans->getDefaultLanguage()] .
2277 ' <a href="' . $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
"") .
2278 '">» ' . $this->lng->txt(
"obj_more_translations") .
'</a>'
2289 if ($this->getCreationMode() ===
false) {
2290 $title->setValue($trans->getDefaultTitle());
2291 $desc->setValue($trans->getDefaultDescription());
2300 array $a_sorting_settings
2307 $sort_inherit->setTitle(
2308 $this->
lng->txt(
'sort_inherit_prefix') .
2311 $this->object->getId()
2316 $sort_inherit->setInfo($this->
lng->txt(
'sorting_info_inherit'));
2317 $sort->addOption($sort_inherit);
2321 $this->
lng->txt(
'sorting_title_header'),
2324 $sort_title->setInfo($this->
lng->txt(
'sorting_info_title'));
2326 $this->initSortingDirectionForm(
$settings, $sort_title,
'title');
2327 $sort->addOption($sort_title);
2331 $this->
lng->txt(
'sorting_creation_header'),
2334 $sort_activation->setInfo($this->
lng->txt(
'sorting_creation_info'));
2335 $this->initSortingDirectionForm(
$settings, $sort_activation,
'creation');
2336 $sort->addOption($sort_activation);
2340 $sort_activation->setInfo($this->
lng->txt(
'crs_sort_timing_info'));
2341 $this->initSortingDirectionForm(
$settings, $sort_activation,
'activation');
2342 $sort->addOption($sort_activation);
2346 $this->
lng->txt(
'sorting_manual_header'),
2349 $sort_manual->setInfo($this->
lng->txt(
'sorting_info_manual'));
2350 $this->initManualSortingOptionForm(
$settings, $sort_manual,
"manual", $a_sorting_settings);
2351 $sort->addOption($sort_manual);
2355 if (in_array(
$settings->getSortMode(), $a_sorting_settings)) {
2356 $sort->setValue((
string)
$settings->getSortMode());
2373 $item_list->setInfo($this->
lng->txt(
'cont_item_list_info'));
2374 $lpres->addOption($item_list);
2377 $tile_view->setInfo($this->
lng->txt(
'cont_tile_view_info'));
2378 $lpres->addOption($tile_view);
2385 $si->addOption($op);
2387 $tile_view->addSubItem($si);
2403 $val = ($form->
getInput(
'list_presentation') ===
"tile")
2410 (
string) ((
int) $form->
getInput(
'tile_size'))
2422 if ($a_prefix ===
'manual') {
2423 $txt = $this->
lng->txt(
'sorting_new_items_direction');
2425 $txt = $this->
lng->txt(
'sorting_direction');
2429 $direction->setValue((
string) $sorting_settings->getSortDirection());
2430 $direction->setRequired(
true);
2434 $this->
lng->txt(
'sorting_asc'),
2437 $direction->addOption($asc);
2441 $this->
lng->txt(
'sorting_desc'),
2444 $direction->addOption($desc);
2446 $element->addSubItem($direction);
2458 array $a_sorting_settings
2461 $this->
lng->txt(
'sorting_new_items_position'),
2462 $a_prefix .
'_new_items_position'
2465 $position->setRequired(
true);
2469 $this->
lng->txt(
'sorting_new_items_at_top'),
2473 $position->addOption($new_top);
2477 $this->
lng->txt(
'sorting_new_items_at_bottom'),
2481 $position->addOption($new_bottom);
2485 $order =
new ilRadioGroupInputGUI($this->
lng->txt(
'sorting_new_items_order'), $a_prefix .
'_new_items_order');
2486 $order->setValue((
string)
$settings->getSortNewItemsOrder());
2487 $order->setRequired(
true);
2492 $this->
lng->txt(
'sorting_title_header'),
2496 $order->addOption($new_title);
2502 $this->
lng->txt(
'sorting_creation_header'),
2506 $order->addOption($new_creation);
2512 $this->
lng->txt(
'crs_sort_activation'),
2516 $order->addOption($new_activation);
2521 $this->initSortingDirectionForm(
$settings, $element,
'manual');
2531 switch ($form->
getInput(
'sorting')) {
2536 $settings->setSortDirection((
int) $form->
getInput(
'activation_sorting_direction'));
2539 $settings->setSortDirection((
int) $form->
getInput(
'creation_sorting_direction'));
2542 $settings->setSortNewItemsPosition($form->
getInput(
'manual_new_items_position'));
2556 $this->checkPermission(
"write");
2559 $this->tabs_gui->activateTab(
'trash');
2562 $trash_table->init();
2563 $trash_table->parse();
2565 $trash_table->setFilterCommand(
'trashApplyFilter');
2566 $trash_table->setResetCommand(
'trashResetFilter');
2568 $tpl->setContent($trash_table->getHTML());
2573 $this->trashHandleFilter(
true,
false);
2578 $this->trashHandleFilter(
false,
true);
2584 $trash_table->init();
2585 $trash_table->resetOffset();
2586 if ($action_reset) {
2587 $trash_table->resetFilter();
2589 if ($action_apply) {
2590 $trash_table->writeFilterToSession();
2592 $this->trashObject();
2597 $this->checkPermission(
"write");
2599 $ru->removeObjectsFromSystem($this->std_request->getTrashIds());
2600 $this->
ctrl->redirect($this,
"trash");
2605 $this->tabs_gui->activateTab(
'trash');
2608 $ru->restoreToNewLocation();
2617 $ru->restoreObjects(
2618 $this->requested_ref_id,
2619 $this->std_request->getTrashIds()
2621 $this->
ctrl->redirect($this,
"trash");
2627 $this->checkPermission(
"write");
2628 if (count($this->std_request->getTrashIds()) == 0) {
2629 $this->tpl->setOnScreenMessage(
'failure',
$lng->txt(
"no_checkbox"),
true);
2630 $this->
ctrl->redirect($this,
"trash");
2634 $ru->confirmRemoveFromSystemObject($this->std_request->getTrashIds());
2644 $exp->setTypeWhiteList([
"root",
"cat",
"grp",
"crs",
"fold"]);
2648 if (in_array($this->clipboard->getCmd(), [
"link",
"cut"])) {
2649 $lso_types = array_keys($this->obj_definition->getSubObjects(
'lso'));
2650 $refs = $this->clipboard->getRefIds();
2652 foreach ($refs as $item_ref_id) {
2654 if (!in_array(
$type, $lso_types)) {
2659 $whitelist = $exp->getTypeWhiteList();
2660 $whitelist[] =
'lso';
2661 $exp->setTypeWhiteList($whitelist);
2665 if ($cmd ===
"link") {
2666 $exp->setSelectMode(
"nodes",
true);
2668 $exp->setSelectMode(
"nodes[]",
false);
2675 $this->
ctrl->setReturn($this,
"");
2686 if ($this->isActiveOrdering() || $this->
ctrl->getCmd() ===
"editOrder") {
2690 $filter_service = $this->container_filter_service;
2691 $request =
$DIC->http()->request();
2693 $filter = $filter_service->util()->getFilterForRefId(
2695 $DIC->ctrl()->getLinkTarget($this,
"render",
"",
true),
2696 $this->isActiveAdministrationPanel()
2699 $filter_data =
$DIC->uiService()->filter()->getData($filter);
2701 $this->container_user_filter = $filter_service->userFilter($filter_data);
2702 $this->ui_filter = $filter;
2708 if (!is_null($this->ui_filter)) {
2709 $renderer =
$DIC->ui()->renderer();
2712 $main_tpl->setFilter($renderer->render($this->ui_filter));
2714 $this->object->getId(),
2715 "filter_show_empty",
2718 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_filter_empty"));
2725 if ($this->checkPermissionBool(
"visible,read")) {
2726 $this->tabs_gui->addTab(
2728 $this->
lng->txt(
'view'),
2729 $this->ctrl->getLinkTarget($this,
'view')
2734 $this->tabs_gui->addTab(
2736 $this->
lng->txt(
'trash'),
2737 $this->ctrl->getLinkTarget($this,
'trash')
2740 if ($this->checkPermissionBool(
"edit_permission")) {
2741 $this->tabs_gui->addTab(
2743 $this->
lng->txt(
'perm_settings'),
2744 $this->ctrl->getLinkTargetByClass(
2757 $ctrl = $this->ctrl;
2759 $ctrl->redirectByClass([
"ilContainerSkillGUI",
"ilContSkillPresentationGUI"]);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
static return function(ContainerConfigurator $containerConfigurator)
setVariable($variable, $value='')
Sets a variable value.
Provides fluid interface to RBAC services.
renderer()
Get a renderer for UI components.
factory()
Get the factory that crafts UI components.
Manages items in repository clipboard.
static _recordReadEvent(string $a_type, int $a_ref_id, int $obj_id, int $usr_id, bool $isCatchupWriteEvents=true, $a_ext_rc=null, $a_ext_time=null)
static _catchupWriteEvents(int $obj_id, int $usr_id, ?string $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
static _recordWriteEvent(int $obj_id, int $usr_id, string $action, ?int $parent_obj_id=null)
Records a write event.
Column user interface class.
setAdminCommands(bool $a_admincommands)
setRepositoryItems(array $a_repositoryitems)
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
afterUpdate()
Post (successful) object update hook.
ilAppEventHandler $app_event_handler
initAndDisplayMoveIntoObjectObject()
StandardGUIRequest $std_request
getAsynchItemListObject()
isActiveAdministrationPanel()
ilObjectDefinition $obj_definition
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.
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()
enableMultiDownloadObject()
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
cloneNodes(int $srcRef, int $dstRef, array &$mapping, string $newName=null)
Recursively clones all nodes of the RBAC tree.
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.
prepareOutput(bool $show_subobjects=true)
allowBlocksConfigure()
Standard is to allow blocks configuration.
trashHandleFilter(bool $action_apply, bool $action_reset)
clearAdminCommandsDetermination()
renderBlockAsynchObject()
render the object
redrawListItemObject()
Redraw a list item (ajax)
ViewManager $view_manager
undeleteObject()
Get objects back from trash.
showPasswordInstructionObject(bool $a_init=true)
restoreToNewLocationObject(ilPropertyFormGUI $form=null)
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()
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...
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...
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)
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
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
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 _isFinished(int $a_copy_id)
getCmd(string $fallback_command=null)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static lookupTemplateId(int $a_ref_id)
Class ilDownloadContainerFilesBackgroundTask.
Error Handling & global info handling uses PEAR error class.
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.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _getLink(?int $a_ref_id, string $a_type='', array $a_params=array(), string $append="")
Component logger with individual log levels by component id.
static showMemberViewSwitch(int $a_ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _appendNumberOfCopyToFilename($a_file_name, $nth_copy=null, $a_handle_extension=false)
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.
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...
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.
ilGlobalTemplateInterface $tpl
__construct($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
getDidacticTemplateVar(string $type)
Get didactic template setting from creation screen.
static _getListGUIByType(string $type, int $context=ilObjectListGUI::CONTEXT_REPOSITORY)
static getInstance(int $obj_id)
static _lookupObjectId(int $ref_id)
static _lookupType(int $id, bool $reference=false)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
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 file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilRbacAdmin Core functions for role based access control.
adjustMovedObjectPermissions(int $ref_id, int $old_parent)
Adjust permissions of moved objects.
static add(int $a_action, int $a_ref_id, array $a_diff, bool $a_source_ref_id=false)
static gatherFaPa(int $a_ref_id, array $a_role_ids, bool $a_add_action=false)
class ilRbacReview Contains Review functions of core Rbac.
getParentRoleIds(int $a_endnode_id, bool $a_templates=false)
Get an array of parent role ids of all parent roles, if last parameter is set true you get also all p...
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
checkAccess(string $a_operations, int $a_ref_id, string $a_type="")
checkAccess represents the main method of the RBAC-system in ILIAS3 developers want to use With this ...
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setBackTarget(string $a_title, string $a_target, string $a_frame="")
clearTargets()
clear all targets
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)
getChilds(int $a_node_id, string $a_order="", string $a_direction="ASC")
get child nodes of given node
Util class various functions, usage as namespace.
static getStyleSheetLocation(string $mode="output", string $a_css_name="", string $a_css_location="")
get full style sheet file name (path inclusive) of current user
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
if(!file_exists(getcwd() . '/ilias.ini.php'))
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...
setContent(string $a_html)
Sets content for standard template.
setPermanentLink(string $a_type, ?int $a_id, string $a_append="", string $a_target="", string $a_title="")
Generates and sets a permanent ilias link.
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
form( $class_path, string $cmd)