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"];
95 $rbacsystem = $DIC->rbac()->system();
96 $lng = $DIC->language();
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") {
185 $values = parent::getEditFormValues();
187 $values[
'didactic_type'] =
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();
216 if (in_array($cmd, [
"displayMediaFullscreen",
"downloadFile",
"displayMedia"])) {
222 $ilTabs->clearTargets();
224 if ($this->requested_redirectSource ===
"ilinternallinkgui") {
228 $ilTabs->setBackTarget(
230 $this->
ctrl->getLinkTargetByClass(
"ilcontainerpagegui",
"edit")
236 $this->content_style_gui->addCss($this->tpl, $this->
object->getRefId());
247 $new_page_object->setParentId($this->
object->getId());
248 $new_page_object->setId($this->
object->getId());
249 $new_page_object->createFromXML();
254 $style = $this->content_style_domain->styleForRefId($this->
object->getRefId());
256 $style->getEffectiveStyleId()
260 $page_gui->getLanguage()
262 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
263 $page_gui->setFileDownloadLink(
"");
265 $page_gui->setPresentationTitle(
"");
266 $page_gui->setTemplateOutput(
false);
269 $page_gui->setTabHook($this,
"addPageTabs");
271 return $this->
ctrl->forwardCommand($page_gui);
281 $ilCtrl->getLinkTargetByClass(
"ilObjectContentStyleSettingsGUI",
''),
282 "editStyleProperties",
283 "ilobjectcontentstylesettingsgui" 292 if (!
$ilSetting->get(
"enable_cat_page_edit") || $this->
object->filteredSubtree()) {
303 $this->content_style_gui->addCss($this->tpl, $this->
object->getRefId());
304 $this->tpl->setCurrentBlock(
"SyntaxStyle");
305 $this->tpl->setVariable(
306 "LOCATION_SYNTAX_STYLESHEET",
309 $this->tpl->parseCurrentBlock();
312 $ot = $this->
object->getObjectTranslation();
313 $lang = $ot->getEffectiveCOPageLang($ilUser->getCurrentLanguage(),
"cont");
315 $style = $this->content_style_domain->styleForRefId($this->
object->getRefId());
316 $page_gui->
setStyleId($style->getEffectiveStyleId());
318 $page_gui->setPresentationTitle(
"");
319 $page_gui->setTemplateOutput(
false);
320 $page_gui->setHeader(
"");
321 $ret = $page_gui->showPage();
332 $this->tpl->setTitle($this->
object->getTitle(),
true);
334 parent::setTitleAndDescription();
352 if ($this->
object->filteredSubtree()) {
355 switch ($view_mode) {
389 return $container_view;
405 if (!$this->item_presentation->canManageItems()) {
406 $this->
ctrl->redirect($this,
"disableAdministrationPanel");
408 $ilTabs->activateSubTab(
"manage");
410 $ilTabs->activateSubTab(
"view_content");
413 $container_view->setOutput();
417 $is_container_cmd = strtolower($this->std_request->getCmdClass()) === strtolower(get_class($this))
418 || ($this->std_request->getCmdClass() ===
"");
422 if ($is_container_cmd) {
425 if (!$this->edit_order) {
432 if (is_object($this->
object) &&
434 $this->rbacsystem->checkAccess(
"write", $this->
object->getRefId())
436 if (
$ilSetting->get(
"enable_cat_page_edit")) {
442 $lng->
txt(
"cntr_text_media_editor"),
443 $ilCtrl->getLinkTarget($this,
"editPageFrame")
448 if (!$this->edit_order) {
460 if ($this->requested_ref_id > 1 &&
$ilSetting->get(
"rep_tree_synchronize")) {
461 $ilCtrl->setParameter($this,
"active_node", $this->requested_ref_id);
476 echo $container_view->getSingleTypeBlockAsynch(
477 $this->std_request->getType()
494 $main_tpl = $DIC->ui()->mainTemplate();
500 $main_tpl->setPageFormAction($this->
ctrl->getFormAction($this));
504 $this->
ctrl->setParameter($this,
"type",
"");
505 $this->
ctrl->setParameter($this,
"item_ref_id",
"");
508 $this->
ui->factory()->button()->standard(
509 $this->
lng->txt(
'paste_clipboard_items'),
510 $this->
ctrl->getLinkTargetByClass([ilRepositoryGUI::class, static::class],
'paste')
515 $this->
ui->factory()->button()->standard(
516 $this->
lng->txt(
'clear_clipboard'),
517 $this->
ctrl->getLinkTargetByClass([ilRepositoryGUI::class, static::class],
'clear')
521 $main_tpl->addAdminPanelToolbar(
$toolbar,
true,
false);
524 $main_tpl->setPageFormAction($this->
ctrl->getFormAction($this));
527 $this->
ctrl->setParameter($this,
"type",
"");
528 $this->
ctrl->setParameter($this,
"item_ref_id",
"");
536 $this->
lng->txt(
'delete_selected_items'),
540 $this->
lng->txt(
'move_selected_items'),
544 $this->
lng->txt(
'copy_selected_items'),
548 $this->
lng->txt(
'link_selected_items'),
555 if ((
bool) $folder_set->get(
'enable_multi_download') ===
true) {
558 $this->
lng->txt(
'download_selected_items'),
563 $main_tpl->addAdminPanelToolbar(
565 $this->
gotItems() && !$this->clipboard->hasEntries(),
566 $this->
gotItems() && !$this->clipboard->hasEntries()
571 $main_tpl->setPageFormAction($this->
ctrl->getFormAction($this));
573 } elseif ($this->edit_order) {
574 if ($this->
getItemPresentation()->hasItems() && $ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
577 $main_tpl->setPageFormAction($this->
ctrl->getFormAction($this));
580 $this->
ctrl->setParameter($this,
"type",
"");
581 $this->
ctrl->setParameter($this,
"item_ref_id",
"");
584 $this->
lng->txt(
'sorting_save'),
588 $main_tpl->addAdminPanelToolbar(
$toolbar,
true,
false);
598 $num_files = $this->tree->getChildsByType(
$ref_id,
"file");
599 $num_folders = $this->tree->getChildsByType(
$ref_id,
"fold");
600 if (count($num_files) > 0 || count($num_folders) > 0) {
602 $GLOBALS[
'tpl']->setPageFormAction($this->
ctrl->getFormAction($this));
605 $this->
ctrl->setParameter($this,
"type",
"");
606 $this->
ctrl->setParameter($this,
"item_ref_id",
"");
609 $this->
lng->txt(
'download_selected_items'),
613 $GLOBALS[
'tpl']->addAdminPanelToolbar(
619 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'msg_no_downloadable_objects'),
true);
633 $tpl = $DIC->ui()->mainTemplate();
637 $this->
object->getRefId(),
645 $this->
ctrl->redirectByClass([static::class,
"ilcontainerpagegui"],
"edit");
650 $this->
ctrl->redirect($this,
"");
661 "tpl.container_link_help.html",
664 "components/ILIAS/Container" 687 foreach ($childs as $child) {
688 if (in_array($child[
"type"], [
"lm",
"sahs",
"htlm"])) {
691 $cnt[$child[
"type"]]++;
697 foreach ($type_ordering as
$type) {
699 if ($type !==
"lres") {
703 " (" . ((
int) $cnt[$type]) .
")" 709 " (" . ((
int) $cnt[
"lres"]) .
")" 722 bool $a_show_image =
true 725 $title = $this->
lng->txt(
"objs_" . $a_type);
735 $a_tpl->
setVariable(
"BLOCK_HEADER_CONTENT", $title);
740 public function addStandardRow(
743 ?
int $a_item_ref_id =
null,
744 ?
int $a_item_obj_id =
null,
745 string $a_image_type =
"" 750 if (
$ilSetting->get(
"icon_position_in_lists") ===
"item_rows") {
752 $alt = $this->
lng->txt(
"obj_" . $a_image_type);
757 $customIconFactory = $DIC[
'object.customicons.factory'];
758 $customIcon = $customIconFactory->getPresenterByObjId($a_item_obj_id, $a_image_type);
760 if ($customIcon->exists()) {
761 $icon = $customIcon->getFullPath();
783 $a_tpl->
setVariable(
'POSITION', sprintf(
'%.1f', $this->current_position++));
800 $type = $this->
lng->txt(
"obj_" . $a_type);
801 $a_message = str_replace(
"[type]",
$type, $a_message);
819 || strtolower($this->
ctrl->getCmdClass()) !==
"ilcontainerpagegui") {
828 $this->tabs_gui->setBackTarget(
829 $this->
lng->txt(
"obj_cat"),
830 $this->
ctrl->getLinkTarget($this,
"")
833 $this->tabs_gui->addTarget(
835 $this->
ctrl->getLinkTargetByClass(
"ilcontainerpagegui",
"view"),
847 bool $a_include_view =
true 854 if (!is_object($this->
object)) {
858 if ($a_include_view && $this->rbacsystem->checkAccess(
"visible,read", $this->object->getRefId())) {
860 $ilTabs->addSubTab(
"view_content",
$lng->
txt(
"view"), $ilCtrl->getLinkTargetByClass(static::class,
"view"));
865 $ilCtrl->getLinkTarget($this,
"disableAdministrationPanel")
871 if ($item_presentation->canManageItems()) {
873 $ilTabs->addSubTab(
"manage",
$lng->
txt(
"cntr_manage"), $ilCtrl->getLinkTarget($this,
""));
878 $ilCtrl->getLinkTarget($this,
"enableAdministrationPanel")
882 if ($item_presentation->canOrderItems()) {
883 $ilTabs->addSubTab(
"ordering",
$lng->
txt(
"cntr_ordering"), $ilCtrl->getLinkTarget($this,
"editOrder"));
893 if ($rbacsystem->
checkAccess(
'edit_permission', $this->ref_id)) {
894 $this->tabs_gui->addTarget(
896 $this->
ctrl->getLinkTargetByClass([get_class($this),
'ilpermissiongui'],
"perm"),
897 [
"perm",
"info",
"owner"],
900 if ($ilCtrl->getNextClass() ===
"ilpermissiongui") {
901 $this->tabs_gui->activateTab(
"perm_settings");
906 if (strtolower($this->std_request->getBaseClass()) ===
"ilrepositorygui" &&
907 $this->clipboard->hasEntries()) {
908 $this->tabs_gui->addTarget(
910 $this->
ctrl->getLinkTarget($this,
"clipboard"),
925 $this->
ctrl->redirect($this,
"render");
931 $this->
ctrl->redirect($this,
"render");
937 $this->edit_order =
true;
941 $ilTabs->activateSubTab(
"ordering");
964 $this->multi_download_enabled =
true;
983 $ids = $this->std_request->getSelectedIds();
986 if (count($ids) === 0) {
987 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
988 $this->
ctrl->redirect($this,
"");
994 $node_data = $this->tree->getNodeData($ref_id);
995 $subtree_nodes = $this->tree->getSubTree($node_data);
997 $all_node_data[] = $node_data;
998 $all_subtree_nodes[] = $subtree_nodes;
1001 foreach ($subtree_nodes as $node) {
1002 if ($node[
'type'] ===
'rolf') {
1006 if (!$rbacsystem->
checkAccess(
'delete', $node[
"ref_id"])) {
1007 $no_cut[] = $node[
"ref_id"];
1012 if (count($no_cut)) {
1014 foreach ($no_cut as $cut_id) {
1018 $this->
lng->txt(
"msg_no_perm_cut") .
" " . implode(
',', $titles),
1022 $this->clipboard->setParent($this->requested_ref_id);
1023 $this->clipboard->setCmd($ilCtrl->getCmd());
1024 $this->clipboard->setRefIds($this->std_request->getSelectedIds());
1026 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"msg_cut_clipboard"),
true);
1044 $ids = $this->std_request->getSelectedIds();
1046 if (count($ids) === 0) {
1047 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1048 $this->
ctrl->redirect($this,
"");
1055 $node_data = $this->tree->getNodeData($ref_id);
1058 if ($objDefinition->isContainer($node_data[
"type"])) {
1062 $subtree_nodes = $this->tree->getSubTree($node_data);
1064 $all_node_data[] = $node_data;
1065 $all_subtree_nodes[] = $subtree_nodes;
1068 foreach ($subtree_nodes as $node) {
1069 if ($node[
'type'] ===
'rolf') {
1073 if (!$rbacsystem->
checkAccess(
'visible,read', $node[
"ref_id"])) {
1074 $no_copy[] = $node[
"ref_id"];
1079 if ($containers > 0 && count($this->std_request->getSelectedIds()) > 1) {
1080 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"cntr_container_only_on_their_own"),
true);
1081 $this->
ctrl->redirect($this,
"");
1085 if (is_array($no_copy) && count($no_copy)) {
1087 foreach ($no_copy as $copy_id) {
1090 $this->tpl->setOnScreenMessage(
1092 $this->
lng->txt(
"msg_no_perm_copy") .
" " . implode(
',', $titles),
1095 $this->
ctrl->redirect($this,
"");
1099 $ids = $this->std_request->getSelectedIds();
1100 if (count($ids) === 1) {
1101 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_id", $ids[0]);
1103 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_ids", implode(
"_", $ids));
1105 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"initTargetSelection");
1107 $this->clipboard->setParent($this->requested_ref_id);
1108 $this->clipboard->setCmd($ilCtrl->getCmd());
1109 $this->clipboard->setRefIds($ids);
1111 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"msg_copy_clipboard"),
true);
1125 $initiated_by_folder_action =
false;
1127 $ids = $this->std_request->getSelectedIds();
1129 if (count($ids) === 0) {
1132 if ($object_type ===
"fold") {
1134 $initiated_by_folder_action =
true;
1136 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1137 $this->
ctrl->redirect($this,
"");
1144 $initiated_by_folder_action
1148 if ($download_job->run()) {
1149 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_bt_download_started'),
true);
1151 $GLOBALS[
'DIC']->ctrl()->redirect($this);
1172 $ids = $this->std_request->getSelectedIds();
1174 if (count($ids) === 0) {
1175 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
1176 $this->
ctrl->redirect($this,
"");
1181 if (!$rbacsystem->
checkAccess(
'delete', $ref_id)) {
1193 if ($no_cut !== []) {
1194 $this->tpl->setOnScreenMessage(
1196 $this->
lng->txt(
"msg_no_perm_link") .
" " . implode(
',', $no_cut),
1199 $this->
ctrl->redirect($this,
"");
1202 if ($no_link !== []) {
1204 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_obj_no_link'),
true);
1205 $this->
ctrl->redirect($this,
"");
1208 $this->clipboard->setParent($this->requested_ref_id);
1209 $this->clipboard->setCmd($ilCtrl->getCmd());
1210 $this->clipboard->setRefIds($ids);
1213 if (count($this->clipboard->getRefIds()) === 1) {
1216 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"msg_link_clipboard_" . $suffix),
true);
1226 $this->clipboard->clear();
1231 if ($this->
ctrl->getCmd() ===
"clear") {
1232 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_clear_clipboard"),
true);
1234 $this->
ctrl->redirect($this,
'render');
1253 $not_allowed_subobject = [];
1256 $command = $this->clipboard->getCmd();
1257 if (!in_array($command, [
'cut',
'link',
'copy'])) {
1258 $message = __METHOD__ .
": cmd was neither 'cut', 'link' nor 'copy'; may be a hack attempt!";
1262 $nodes = $this->std_request->getNodes();
1264 if (count($nodes) === 0) {
1265 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_at_least_one_object'));
1277 $folder_objects_cache = [];
1278 foreach ($this->clipboard->getRefIds() as
$ref_id) {
1282 foreach ($nodes as $folder_ref_id) {
1283 if (!array_key_exists($folder_ref_id, $folder_objects_cache)) {
1288 if (!$rbacsystem->
checkAccess(
'create', $folder_ref_id, $obj_data->getType())) {
1289 $no_paste[] = sprintf(
1290 $this->
lng->txt(
'msg_no_perm_paste_object_in_folder'),
1291 $obj_data->getTitle() .
' [' . $obj_data->getRefId() .
']',
1292 $folder_objects_cache[$folder_ref_id]->getTitle(
1293 ) .
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() .
']' 1298 if ($folder_ref_id == $current_parent_id) {
1299 $exists[] = sprintf(
1300 $this->
lng->txt(
'msg_obj_exists_in_folder'),
1301 $obj_data->getTitle() .
' [' . $obj_data->getRefId() .
']',
1302 $folder_objects_cache[$folder_ref_id]->getTitle(
1303 ) .
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() .
']' 1309 $is_child[] = sprintf(
1310 $this->
lng->txt(
'msg_paste_object_not_in_itself'),
1311 $obj_data->getTitle() .
' [' . $obj_data->getRefId() .
']' 1316 if (!array_key_exists(
1317 $obj_data->getType(),
1318 $folder_objects_cache[$folder_ref_id]->getPossibleSubObjects()
1320 $not_allowed_subobject[] = sprintf(
1321 $this->
lng->txt(
'msg_obj_may_not_contain_objects_of_type'),
1322 $folder_objects_cache[$folder_ref_id]->getTitle(
1323 ) .
' [' . $folder_objects_cache[$folder_ref_id]->getRefId() .
']',
1324 $lng->
txt(
'obj_' . $obj_data->getType())
1333 if ($command !==
"copy" && count($exists)) {
1334 $error .= implode(
'<br />', $exists);
1337 if (count($is_child)) {
1338 $error .= $error !==
'' ?
'<br />' :
'';
1339 $error .= implode(
'<br />', $is_child);
1342 if (count($not_allowed_subobject)) {
1343 $error .= $error !==
'' ?
'<br />' :
'';
1344 $error .= implode(
'<br />', $not_allowed_subobject);
1347 if (count($no_paste)) {
1348 $error .= $error !==
'' ?
'<br />' :
'';
1349 $error .= implode(
'<br />', $no_paste);
1352 if ($error !==
'') {
1353 $this->tpl->setOnScreenMessage(
'failure', $error);
1365 $ilLog->write(__METHOD__ .
", cmd: " . $command);
1371 $ref_ids = $this->clipboard->getRefIds();
1372 $this->clipboard->clear();
1376 if ($command ===
'copy') {
1377 foreach ($nodes as $folder_ref_id) {
1378 foreach ($ref_ids as
$ref_id) {
1382 if ($oldNode_data[
'parent'] == $folder_ref_id) {
1384 $newRef = $this->
cloneNodes($ref_id, $folder_ref_id, $refIdMapping, $newTitle);
1386 $newRef = $this->
cloneNodes($ref_id, $folder_ref_id, $refIdMapping,
null);
1393 $oldNode_data[
'type'],
1395 $oldNode_data[
'obj_id'],
1399 $newNode_data[
'obj_id'],
1402 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1409 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_cloned'),
true);
1413 if ($command ===
'cut') {
1414 foreach ($nodes as $folder_ref_id) {
1415 foreach ($ref_ids as
$ref_id) {
1427 $node_data[
'obj_id'],
1430 $old_parent_data[
'obj_id']
1433 $node_data[
'obj_id'],
1436 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1446 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_cut_copied'),
true);
1450 if ($command ===
'link') {
1452 $linked_to_folders = [];
1456 foreach ($nodes as $folder_ref_id) {
1457 $linked_to_folders[$folder_ref_id] = $ilObjDataCache->lookupTitle(
1458 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1461 foreach ($ref_ids as
$ref_id) {
1470 foreach ($subnodes as $key => $subnode) {
1473 $new_ref_id = $obj_data->createReference();
1474 $obj_data->putInTree($folder_ref_id);
1475 $obj_data->setPermissions($folder_ref_id);
1478 if ($rbac_log_active) {
1487 $node_data[
'obj_id'],
1490 $ilObjDataCache->lookupObjId((
int) $folder_ref_id)
1496 $ilLog->write(__METHOD__ .
', link finished');
1500 if (count($linked_to_folders)) {
1501 foreach ($linked_to_folders as
$ref_id => $title) {
1502 $links[] = $ui->
factory()->link()->standard($title, ilLink::_getLink(
$ref_id));
1507 if (count($ref_ids) === 1) {
1511 $mbox = $ui->
factory()->messageBox()->success(
1512 $this->
lng->txt(
'mgs_objects_linked_to_the_following_folders_' . $suffix)
1514 ->withLinks($links);
1516 $this->tpl->setOnScreenMessage(
'success', $ui->
renderer()->render($mbox),
true);
1522 $this->
ctrl->returnToParent($this);
1535 $ilTabs->setTabActive(
'view_content');
1537 if (!in_array($this->clipboard->getCmd(), [
'link',
'copy',
'cut'])) {
1538 $message = __METHOD__ .
": Unknown action.";
1541 $cmd = $this->clipboard->getCmd();
1545 if ($exp->handleCommand()) {
1548 $output = $exp->getHTML();
1550 $txt_var = ($cmd ===
"copy")
1556 $t->setFormAction($this->
ctrl->getFormAction($this,
"performPasteIntoMultipleObjects"));
1559 $this->
lng->txt($txt_var),
1560 "performPasteIntoMultipleObjects" 1561 )->submit()->toToolbar(
true, $t);
1564 $this->
lng->loadLanguageModule(
'obj');
1565 $t->addFormButton($this->
lng->txt(
"obj_insert_into_clipboard"),
"keepObjectsInClipboard");
1567 $t->addFormButton($this->
lng->txt(
"cancel"),
"cancelMoveLink");
1568 $t->setCloseFormTag(
false);
1570 $output = $t->getHTML() . $output;
1572 $t->setCloseFormTag(
true);
1573 $t->setOpenFormTag(
false);
1574 $output .=
"<br />" . $t->getHTML();
1576 $this->tpl->setContent($output);
1587 $this->clipboard->clear();
1595 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"obj_inserted_clipboard"),
true);
1626 $not_allowed_subobject = [];
1629 if (!in_array($this->clipboard->getCmd(), [
"cut",
"link",
"copy"])) {
1632 ) .
"::pasteObject(): cmd was neither 'cut','link' or 'copy'; may be a hack attempt!";
1637 foreach ($this->clipboard->getRefIds() as
$ref_id) {
1641 if (!$rbacsystem->
checkAccess(
'create', $this->object->getRefId(), $obj_data->getType())) {
1643 $no_paste_titles[] = $obj_data->getTitle();
1647 if ($this->
object->getRefId() === $this->tree->getParentId($obj_data->getRefId())) {
1653 if ($this->tree->isGrandChild(
$ref_id, $this->object->getRefId())) {
1662 $obj_type = $obj_data->getType();
1664 if (!array_key_exists($obj_type, $this->
object->getPossibleSubObjects())) {
1665 $not_allowed_subobject[] = $obj_data->getType();
1672 if (count($exists) > 0 && $this->clipboard->getCmd() !==
"copy") {
1674 $ilErr->raiseError($this->
lng->txt(
"msg_obj_exists"),
$ilErr->MESSAGE);
1677 if (count($is_child) > 0) {
1679 $this->
lng->txt(
"msg_not_in_itself") .
" " . implode(
',', $is_child),
1684 if (count($not_allowed_subobject) > 0) {
1686 $this->
lng->txt(
"msg_may_not_contain") .
" " . implode(
',', $not_allowed_subobject),
1691 if (count($no_paste) > 0) {
1693 $this->
lng->txt(
"msg_no_perm_paste") .
" " .
1694 implode(
',', $no_paste),
1700 $ilLog->write(
"ilObjectGUI::pasteObject(), cmd: " . $this->clipboard->getCmd());
1706 $ref_ids = $this->clipboard->getRefIds();
1709 $last_cmd = $this->clipboard->getCmd();
1713 if ($this->clipboard->getCmd() ===
"copy") {
1714 $this->clipboard->clear();
1717 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"target", $this->
object->getRefId());
1718 if (count($ref_ids) === 1) {
1719 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_id", $ref_ids[0]);
1721 $ilCtrl->setParameterByClass(
"ilobjectcopygui",
"source_ids", implode(
"_", $ref_ids));
1723 $ilCtrl->redirectByClass(
"ilobjectcopygui",
"saveTarget");
1725 $ilLog->write(
"ilObjectGUI::pasteObject(), copy finished");
1730 if ($this->clipboard->getCmd() ===
"cut") {
1731 foreach ($ref_ids as
$ref_id) {
1734 $this->tree->moveTree($ref_id, $this->
object->getRefId());
1743 $node_data[
'obj_id'],
1746 $old_parent_data[
'obj_id']
1749 $node_data[
'obj_id'],
1752 $this->
object->getId()
1762 if ($this->clipboard->getCmd() ===
"link") {
1763 foreach ($ref_ids as $ref_id) {
1765 $top_node = $this->tree->getNodeData($ref_id);
1768 $subnodes[
$ref_id] = $this->tree->getSubTree($top_node);
1771 foreach ($subnodes as $key => $subnode) {
1774 $new_ref_id = $obj_data->createReference();
1775 $obj_data->putInTree($this->requested_ref_id);
1776 $obj_data->setPermissions($this->requested_ref_id);
1781 $node_data[
'obj_id'],
1784 $this->
object->getId()
1790 $ilLog->write(
"ilObjectGUI::pasteObject(), link finished");
1797 if ($last_cmd ===
"cut") {
1798 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_cut_copied"),
true);
1800 elseif ($last_cmd ===
"copy") {
1801 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_cloned"),
true);
1802 } elseif ($last_cmd ===
'link') {
1804 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_linked"),
true);
1807 $this->
ctrl->returnToParent($this);
1821 $ilTabs->activateTab(
"clipboard");
1824 if (!$this->clipboard->hasEntries()) {
1825 $message = sprintf(
'%s::clipboardObject(): Illegal access. Clipboard variable is empty!', get_class($this));
1826 $ilLog->write(
$message, $ilLog->FATAL);
1827 $ilErr->raiseError($this->
lng->txt(
"permission_denied"),
$ilErr->WARNING);
1831 foreach ($this->clipboard->getRefIds() as
$ref_id) {
1837 "type" => $tmp_obj->getType(),
1838 "type_txt" => $this->
lng->txt(
"obj_" . $tmp_obj->getType()),
1839 "title" => $tmp_obj->getTitle(),
1840 "cmd" => ($this->clipboard->getCmd() ===
"cut") ? $this->
lng->txt(
"move") : $this->
lng->txt(
1841 $this->clipboard->getCmd()
1844 "obj_id" => $tmp_obj->getId()
1851 $tab->setData(
$data);
1854 if (count(
$data) > 0) {
1855 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1856 $ilToolbar->addFormButton(
1857 $lng->
txt(
"insert_object_here"),
1860 $ilToolbar->addFormButton(
1870 if ($this->
object->getRefId() &&
1871 !$this->rbacsystem->checkAccess(
"visible,read", $this->
object->getRefId())) {
1881 parent::setColumnSettings($column_gui);
1884 $this->item_presentation
1889 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
1930 $new_type = $this->std_request->getNewType();
1932 $clone_source = $this->std_request->getCloneSource();
1935 $ilErr->raiseError($this->
lng->txt(
'permission_denied'));
1937 if (!$clone_source) {
1938 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
1942 if (!$ilAccess->checkAccess(
'write',
'', $clone_source, $new_type)) {
1943 $ilErr->raiseError($this->
lng->txt(
'permission_denied'));
1946 $options = $this->std_request->getCopyOptions();
1948 $result = $orig->cloneAllObject(
1958 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_duplicated"),
true);
1959 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $result[
'ref_id']);
1961 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"object_copy_in_progress"),
true);
1962 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$ref_id);
1964 $ilCtrl->redirectByClass(
"ilrepositorygui",
"");
1972 $positions = $this->std_request->getPositions();
1973 $sorting->savePost($positions);
1974 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cntr_saved_sorting'),
true);
1975 $this->
ctrl->redirect($this,
"editOrder");
1987 ?
string $newName =
null 1993 $newRef = $srcObj->cloneObject($dstRef)->getRefId();
1998 if (!is_null($newName)) {
2000 $newObj->setTitle($newName);
2005 $mapping[$newRef] = $srcRef;
2012 if ($child[
"type"] !==
'rolf') {
2013 $this->
cloneNodes($child[
"ref_id"], $newRef, $mapping);
2015 $mapping[$rolf[0][
"ref_id"]] = $child[
"ref_id"];
2046 int $a_course_ref_id
2050 $tree = $DIC->repositoryTree();
2055 foreach ($path_arr as
$data) {
2059 $path .= $data[
'title'];
2068 $this->content_style_gui
2069 ->redirectToObjectSettings();
2089 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'webdav_pwd_instruction'));
2097 $this->
lng->txt(
"mount_webfolder"),
2099 )->onClick(
"triggerWebDAVModal('$href'); return false;")->toToolbar();
2110 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
2116 $this->
form->addItem($ipass);
2117 $this->
form->addCommandButton(
"savePassword", $this->
lng->txt(
"save"));
2118 $this->
form->addCommandButton(
'cancel', $this->
lng->txt(
'cancel'));
2120 $this->
form->setTitle($this->
lng->txt(
"chg_ilias_and_webfolder_password"));
2121 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
2132 $ilUser->resetPassword($this->
form->getInput(
'new_password'), $this->
form->getInput(
'new_password'));
2133 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'webdav_pwd_instruction_success'),
true);
2150 $child_ref_id = $this->std_request->getChildRefId();
2151 $parent_ref_id = $this->std_request->getParentRefId();
2153 $item_data = $this->
object->getSubItems(
false,
false, $child_ref_id);
2158 if (isset($this->
object->items[
"sess"])) {
2159 $sess_data = $this->
object->items[
"sess"];
2168 if (in_array($child_ref_id, $event_items)) {
2169 foreach (($sess_data) as
$id) {
2171 foreach ($items as $event_item) {
2172 if ($event_item[
"child"] == $child_ref_id) {
2174 if ($parent_ref_id > 0) {
2175 $event_item[
"parent"] = $parent_ref_id;
2177 $html = $container_view->renderItem($event_item);
2185 foreach (($this->
object->items[
"_all"] ?? []) as
$id) {
2186 if ($id[
"child"] == $child_ref_id) {
2187 $html = $container_view->renderItem($id);
2209 $form->
setTitle($this->
lng->txt($this->object->getType() .
"_edit"));
2211 $this->initFormTitleDescription($form);
2228 $trans = $this->
object->getObjectTranslation();
2231 $title->setRequired(
true);
2236 if ($this->
getCreationMode() ===
false && count($trans->getLanguages()) > 1) {
2237 $languages = $this->domain->metadata()->getLOMLanguagesForSelectInputs();
2239 $this->
lng->txt(
"language") .
": " . $languages[$trans->getDefaultLanguage()] .
2240 ' <a href="' . $this->
ctrl->getLinkTargetByClass(TranslationGUI::class,
"") .
2241 '">» ' . $this->
lng->txt(
"obj_more_translations") .
'</a>' 2253 $title->setValue($trans->getDefaultTitle());
2254 $desc->setValue($trans->getDefaultDescription());
2263 array $a_sorting_settings
2270 $sort_inherit->setTitle(
2271 $this->
lng->txt(
'sort_inherit_prefix') .
2279 $sort_inherit->setInfo($this->
lng->txt(
'sorting_info_inherit'));
2280 $sort->addOption($sort_inherit);
2284 $this->
lng->txt(
'sorting_title_header'),
2287 $sort_title->setInfo($this->
lng->txt(
'sorting_info_title'));
2290 $sort->addOption($sort_title);
2294 $this->
lng->txt(
'sorting_creation_header'),
2297 $sort_activation->setInfo($this->
lng->txt(
'sorting_creation_info'));
2299 $sort->addOption($sort_activation);
2303 $sort_activation->setInfo($this->
lng->txt(
'crs_sort_timing_info'));
2305 $sort->addOption($sort_activation);
2309 $this->
lng->txt(
'sorting_manual_header'),
2312 $sort_manual->setInfo($this->
lng->txt(
'sorting_info_manual'));
2314 $sort->addOption($sort_manual);
2318 if (in_array(
$settings->getSortMode(), $a_sorting_settings)) {
2319 $sort->setValue((
string)
$settings->getSortMode());
2336 $item_list->
setInfo($this->
lng->txt(
'cont_item_list_info'));
2337 $lpres->addOption($item_list);
2340 $tile_view->
setInfo($this->
lng->txt(
'cont_tile_view_info'));
2341 $lpres->addOption($tile_view);
2346 foreach ($this->
object->getTileSizes() as $key =>
$txt) {
2348 $si->addOption($op);
2350 $tile_view->addSubItem($si);
2366 $val = ($form->
getInput(
'list_presentation') ===
"tile")
2373 (string) ((
int) $form->
getInput(
'tile_size'))
2385 if ($a_prefix ===
'manual') {
2386 $txt = $this->
lng->txt(
'sorting_new_items_direction');
2388 $txt = $this->
lng->txt(
'sorting_direction');
2393 $direction->setRequired(
true);
2397 $this->
lng->txt(
'sorting_asc'),
2400 $direction->addOption($asc);
2404 $this->
lng->txt(
'sorting_desc'),
2407 $direction->addOption($desc);
2421 array $a_sorting_settings
2424 $this->
lng->txt(
'sorting_new_items_position'),
2425 $a_prefix .
'_new_items_position' 2428 $position->setRequired(
true);
2432 $this->
lng->txt(
'sorting_new_items_at_top'),
2436 $position->addOption($new_top);
2440 $this->
lng->txt(
'sorting_new_items_at_bottom'),
2444 $position->addOption($new_bottom);
2448 $order =
new ilRadioGroupInputGUI($this->
lng->txt(
'sorting_new_items_order'), $a_prefix .
'_new_items_order');
2450 $order->setRequired(
true);
2455 $this->
lng->txt(
'sorting_title_header'),
2459 $order->addOption($new_title);
2465 $this->
lng->txt(
'sorting_creation_header'),
2469 $order->addOption($new_creation);
2475 $this->
lng->txt(
'crs_sort_activation'),
2479 $order->addOption($new_activation);
2494 switch ($form->
getInput(
'sorting')) {
2499 $settings->setSortDirection((
int) $form->
getInput(
'activation_sorting_direction'));
2502 $settings->setSortDirection((
int) $form->
getInput(
'creation_sorting_direction'));
2505 $settings->setSortNewItemsPosition($form->
getInput(
'manual_new_items_position'));
2522 $this->tabs_gui->activateTab(
'trash');
2524 $this->
lng->loadLanguageModule(
'cont');
2528 $trash_table->
init();
2529 $trash_table->parse();
2531 $trash_table->setFilterCommand(
'trashApplyFilter');
2532 $trash_table->setResetCommand(
'trashResetFilter');
2550 $trash_table->
init();
2551 $trash_table->resetOffset();
2552 if ($action_reset) {
2553 $trash_table->resetFilter();
2555 if ($action_apply) {
2556 $trash_table->writeFilterToSession();
2565 $ru->removeObjectsFromSystem($this->std_request->getTrashIds());
2566 $this->
ctrl->redirect($this,
"trash");
2571 $this->tabs_gui->activateTab(
'trash');
2574 $ru->restoreToNewLocation();
2583 $ru->restoreObjects(
2584 $this->requested_ref_id,
2585 $this->std_request->getTrashIds()
2587 $this->
ctrl->redirect($this,
"trash");
2594 if (count($this->std_request->getTrashIds()) == 0) {
2595 $this->tpl->setOnScreenMessage(
'failure',
$lng->
txt(
"no_checkbox"),
true);
2596 $this->
ctrl->redirect($this,
"trash");
2600 $ru->confirmRemoveFromSystemObject($this->std_request->getTrashIds());
2610 $exp->setTypeWhiteList([
"root",
"cat",
"grp",
"crs",
"fold"]);
2614 if (in_array($this->clipboard->getCmd(), [
"link",
"cut"])) {
2615 $lso_types = array_keys($this->obj_definition->getSubObjects(
'lso'));
2616 $refs = $this->clipboard->getRefIds();
2618 foreach ($refs as $item_ref_id) {
2620 if (!in_array(
$type, $lso_types)) {
2625 $whitelist = $exp->getTypeWhiteList();
2626 $whitelist[] =
'lso';
2627 $exp->setTypeWhiteList($whitelist);
2631 if ($cmd ===
"link") {
2632 $exp->setSelectMode(
"nodes",
true);
2634 $exp->setSelectMode(
"nodes[]",
false);
2641 $this->
ctrl->setReturn($this,
"");
2657 $request = $DIC->http()->request();
2659 $filter = $filter_service->util()->getFilterForRefId(
2661 $DIC->ctrl()->getLinkTarget($this,
"render",
"",
true),
2665 $filter_data = $DIC->uiService()->filter()->getData($filter);
2667 $this->container_user_filter = $filter_service->userFilter($filter_data);
2668 $this->ui_filter = $filter;
2674 if (!is_null($this->ui_filter)) {
2678 $main_tpl->setFilter(
$renderer->render($this->ui_filter));
2681 "filter_show_empty",
2692 $this->tabs_gui->addTab(
2694 $this->
lng->txt(
'view'),
2695 $this->
ctrl->getLinkTarget($this,
'view')
2700 $this->tabs_gui->addTab(
2702 $this->
lng->txt(
'trash'),
2703 $this->
ctrl->getLinkTarget($this,
'trash')
2707 $this->tabs_gui->addTab(
2709 $this->
lng->txt(
'perm_settings'),
2710 $this->
ctrl->getLinkTargetByClass(
ilContainerUserFilter $container_user_filter
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
moveTree(int $a_source_id, int $a_target_id, int $a_location=self::POS_LAST_NODE)
Move Tree Implementation public.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilObjectDefinition $obj_definition
restoreToNewLocationObject(?ilPropertyFormGUI $form=null)
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user
This class represents an option in a radio group.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
ILIAS Container Content ItemPresentationManager $item_presentation
redrawListItemObject()
Redraw a list item (ajax)
initAndDisplayMoveIntoObjectObject()
ilObjectDataCache $obj_data_cache
adjustMovedObjectPermissions(int $ref_id, int $old_parent)
Adjust permissions of moved objects.
enableAdministrationPanelObject()
clearObject()
clear clipboard and go back to last object
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
const SORT_NEW_ITEMS_POSITION_TOP
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
saveSortingSettings(ilPropertyFormGUI $form)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
renderBlockAsynchObject()
render the object
special template class to simplify handling of ITX/PEAR
StandardGUIRequest $std_request
static getItemsByEvent(int $event_id)
Get session material / event items.
string $requested_redirectSource
Class ilDownloadContainerFilesBackgroundTask.
Container page GUI class.
initSortingDirectionForm(ilContainerSortingSettings $sorting_settings, ilRadioOption $element, string $a_prefix)
Add sorting direction.
prepareOutput(bool $show_sub_objects=true)
initAndDisplayCopyIntoMultipleObjectsObject()
Interface Observer Contains several chained tasks and infos about them.
getTreeSelectorGUI(string $cmd)
addMessageRow(ilTemplate $a_tpl, string $a_message, string $a_type)
getChilds(int $a_node_id, string $a_order="", string $a_direction="ASC")
get child nodes of given node
cloneAllObject()
Clone all object Overwritten method for copying container objects.
allowBlocksMoving()
Standard is to allow blocks moving.
trashObject()
Show trash content of object.
getCmd(?string $fallback_command=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getDidacticTemplateVar(string $type)
Get didactic template setting from creation screen.
trashHandleFilter(bool $action_apply, bool $action_reset)
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.
setAdminCommands(bool $a_admincommands)
confirmRemoveFromSystemObject()
loadLanguageModule(string $a_module)
Load language module.
createObject()
create new object form
enableMultiDownloadObject()
ilContainerFilterService $container_filter_service
setVariable(string $variable, $value='')
Sets the given variable to the given value.
static _getItemsOfContainer(int $a_ref_id)
setStyleId(int $a_styleid)
initAndDisplayLinkIntoMultipleObjectsObject()
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
getPathFull(int $a_endnode_id, int $a_startnode_id=0)
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnod...
isActiveAdministrationPanel()
ClipboardManager $clipboard
static _appendNumberOfCopyToFilename($a_file_name, $nth_copy=null)
Appends the text " - Copy" to a filename in the language of the current user.
static _lookupObjId(int $ref_id)
ModeManager $mode_manager
Parent class of all container content GUIs.
isGrandChild(int $a_startnode_id, int $a_querynode_id)
checks if a node is in the path of an other node
static getASCIIFilename(string $a_filename)
initFormPasswordInstruction()
Init password form.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getItemPresentation( $include_empty_blocks=true, ?string $lang=null)
static gatherFaPa(int $ref_id, array $role_ids, bool $add_action=false)
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 ...
static _lookupSortMode(int $a_obj_id)
touchBlock(string $block)
pasteObject()
paste object from clipboard to current place Depending on the chosen command the object(s) are linked...
getChildsByType(int $a_node_id, string $a_type)
get child nodes of given node by object type
Provides fluid interface to RBAC services.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
editStylePropertiesObject()
static lookupTemplateId(int $a_ref_id)
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) ...
ilComponentFactory $component_factory
const SORT_NEW_ITEMS_POSITION_BOTTOM
setVariable($variable, $value='')
Sets a variable value.
ilGlobalTemplateInterface $tpl
static _lookupTitle(int $obj_id)
undeleteObject()
Get objects back from trash.
getParentNodeData(int $a_node_id)
get data of parent node from tree and object_data
showPasswordInstructionObject(bool $a_init=true)
addStandardContainerSubTabs(bool $a_include_view=true)
Add standard container subtabs for view, manage, oderdering and text/media editor link...
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
linkObject()
create an new reference of an object in tree it's like a hard link of unix
Column user interface class.
ILIAS Style Content GUIService $content_style_gui
setColumnSettings(ilColumnGUI $column_gui)
const SORT_NEW_ITEMS_ORDER_CREATION
ServerRequestInterface $request
renderer()
Get a renderer for UI components.
allowBlocksConfigure()
Standard is to allow blocks configuration.
Class ilObjectGUI Basic methods of all Output classes.
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 getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
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...
static _isFinished(int $a_copy_id)
setBackTarget(string $a_title, string $a_target, string $a_frame="")
Repository GUI Utilities.
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 _lookupObjectId(int $ref_id)
static _recordWriteEvent(int $obj_id, int $usr_id, string $action, ?int $parent_obj_id=null)
Records a write event.
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...
setItemPresentationManager(ItemPresentationManager $item_presentation)
cancelMoveLinkObject()
Cancel move|link empty clipboard and return to parent.
Manages items in repository clipboard.
getParentId(int $a_node_id)
get parent id of given node
clearTargets()
clear all targets
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 getSyntaxStylePath()
initManualSortingOptionForm(ilContainerSortingSettings $settings, ilRadioOption $element, string $a_prefix, array $a_sorting_settings)
Add manual sorting options.
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
copyObject()
Copy object(s) out from a container and write the information to clipboard It is not possible to copy...
disableAdministrationPanelObject()
cloneNodes(int $srcRef, int $dstRef, array &$mapping, ?string $newName=null)
Recursively clones all nodes of the RBAC tree.
saveListPresentation(ilPropertyFormGUI $form)
static showMemberViewSwitch(int $a_ref_id)
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
const SORT_NEW_ITEMS_ORDER_ACTIVATION
getOnLoadCodeForAsynch()
Get js onload code for ajax calls.
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
buildAddNewItemElements(array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
static add(int $action, int $ref_id, array $diff, bool $source_ref_id=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
form( $class_path, string $cmd, string $submit_caption="")
Render add new item selector.
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
getSortNewItemsPosition()
addAvailabilityPeriodButtonToToolbar(ilToolbarGUI $toolbar)
performPasteIntoMultipleObjectsObject()
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
addImportButtonToToolbar()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setPermanentLink(string $a_type, ?int $a_id, string $a_append="", string $a_target="", string $a_title="")
Generates and sets a permanent ilias link.
Explorer class that works on tree objects (Services/Tree)
__construct(Container $dic, ilPlugin $plugin)
const SORT_DIRECTION_DESC
static lookupSortModeFromParentContainer(int $a_obj_id)
This class represents a text area property in a property form.
static _getInstance(int $a_obj_id)
static sortModeToString(int $a_sort_mode)
Get string representation of sort mode.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
bool $multi_download_enabled
cutObject()
cut object(s) out from a container and write the information to clipboard public ...
ilAppEventHandler $app_event_handler
ILIAS Container InternalGUIService $gui
getCreatableObjectTypes()
factory()
Get the factory that crafts UI components.
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)
Class ilRbacAdmin Core functions for role based access control.
showAdministrationPanel()
getUriToMountInstructionModalByRef(int $a_ref_id)
static _buildPath(int $a_ref_id, int $a_course_ref_id)
build path
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
returnToParent(object $a_gui_obj, ?string $a_anchor=null)
getSubTree(array $a_node, bool $a_with_data=true, array $a_type=[])
get all nodes in the subtree under specified node
static _lookupType(int $id, bool $reference=false)
addHeaderRow(ilTemplate $a_tpl, string $a_type, bool $a_show_image=true)
static _catchupWriteEvents(int $obj_id, int $usr_id, ?string $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
const SORT_NEW_ITEMS_ORDER_TITLE
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
ILIAS Container InternalDomainService $domain
keepObjectsInClipboardObject()
initEditCustomForm(ilPropertyFormGUI $a_form)
Add custom fields to update form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
modifyItemGUI(ilObjectListGUI $a_item_list_gui, array $a_item_data)
cancelPageContentObject()
ILIAS Style Content DomainService $content_style_domain