19 declare(strict_types=1);
    95         $this->
ctrl = $DIC[
'ilCtrl'];
    96         $this->tree = $DIC[
'tree'];
    97         $this->
tabs = $DIC[
'ilTabs'];
    98         $this->tpl = $DIC[
"tpl"];
    99         $this->obj_definition = $DIC[
"objDefinition"];
   100         $this->obj_data_cache = $DIC[
"ilObjDataCache"];
   101         $this->
access = $DIC->access();
   102         $this->error = $DIC[
"ilErr"];
   103         $this->
user = $DIC[
'ilUser'];
   104         $this->rbacsystem = $DIC[
'rbacsystem'];
   105         $this->rbacreview = $DIC[
'rbacreview'];
   107         $this->
lng = $DIC[
'lng'];
   108         $this->request_wrapper = $DIC->http()->wrapper()->query();
   109         $this->post_wrapper = $DIC->http()->wrapper()->post();
   111         $this->request = $DIC->http()->request();
   112         $this->ui_factory = $DIC[
'ui.factory'];
   113         $this->ui_renderer = $DIC[
'ui.renderer'];
   119         $this->parent_obj = $parent_gui;
   121         $this->
lng->loadLanguageModule(
'search');
   122         $this->
lng->loadLanguageModule(
'obj');
   123         $this->
ctrl->saveParameter($this, 
"crtcb");
   125         $this->clipboard = $DIC
   138         $this->
ctrl->getNextClass($this);
   139         $cmd = $this->
ctrl->getCmd();
   144     protected function init(): void
   146         if ($this->retriever->has(
'smode')) {
   147             $this->
setSubMode($this->retriever->getMaybeInt(
'smode') ?? 0);
   153         if ($this->retriever->has(
'source_ids')) {
   154             $this->
setSource(explode(
'_', $this->retriever->getMaybeString(
'source_ids')));
   155             $this->
ctrl->setParameter($this, 
'source_ids', implode(
'_', $this->
getSources()));
   158         if ($this->retriever->has(
'source_id')) {
   159             $this->
setSource([$this->retriever->getMaybeInt(
'source_id')]);
   160             $this->
ctrl->setParameter($this, 
'source_ids', implode(
'_', $this->
getSources()));
   170         if ($this->retriever->has(
'new_type')) {
   171             $this->
setMode(self::SEARCH_SOURCE);
   172             $this->
setType($this->retriever->getMaybeString(
'new_type'));
   173             $this->
setTarget($this->request_wrapper->retrieve(
"ref_id", $this->refinery->kindlyTo()->int()));
   175             $this->
ctrl->setParameter($this, 
'new_type', $this->
getType());
   184         elseif ($this->retriever->getMaybeInt(
'selectMode') === self::SOURCE_SELECTION) {
   185             $this->
setMode(self::SOURCE_SELECTION);
   187             $this->
ctrl->setParameterByClass(get_class($this->parent_obj), 
'selectMode', self::SOURCE_SELECTION);
   188             $this->
setTarget($this->request_wrapper->retrieve(
"ref_id", $this->refinery->kindlyTo()->int()));
   189             $this->
ctrl->setReturnByClass(get_class($this->parent_obj), 
'');
   192         } elseif ($this->retriever->getMaybeInt(
'selectMode') === self::TARGET_SELECTION) {
   193             $this->
setMode(self::TARGET_SELECTION);
   194             $this->
ctrl->setReturnByClass(get_class($this->parent_obj), 
'');
   199         if ($this->retriever->has(
'target_ids')) {
   200             $this->
setTargets(explode(
'_', $this->retriever->getMaybeString(
'target_ids')));
   207         $this->
lng->loadLanguageModule(
'cntr');
   208         $this->
tabs->clearTargets();
   209         $this->
tabs->setBackTarget(
   210             $this->
lng->txt(
'cancel'),
   211             (string) $this->
ctrl->getParentReturn($this->parent_obj)
   215     protected function setTabs(
int $tab_group, 
int $active_tab): void
   217         if ($tab_group == self::TAB_GROUP_SC_SELECTION) {
   218             if ($this->
getSubMode() == self::SUBMODE_CONTENT_ONLY) {
   219                 if ($this->
getMode() == self::SOURCE_SELECTION) {
   221                         (
string) self::TAB_SELECTION_SOURCE_TREE,
   222                         $this->
lng->txt(
'cntr_copy_repo_tree'),
   223                         $this->
ctrl->getLinkTarget($this, 
'initSourceSelection')
   226                         (
string) self::TAB_SELECTION_MEMBERSHIP,
   227                         $this->
lng->txt(
'cntr_copy_crs_grp'),
   228                         $this->
ctrl->getLinkTarget($this, 
'showSourceSelectionMembership')
   233         $this->
tabs->activateTab((
string) $active_tab);
   241         $this->
ctrl->setParameter($this, 
'smode', self::SUBMODE_CONTENT_ONLY);
   242         $this->
ctrl->setParameter($this, 
'selectMode', self::SOURCE_SELECTION);
   244         $this->
setSubMode(self::SUBMODE_CONTENT_ONLY);
   245         $this->
setMode(self::SOURCE_SELECTION);
   246         $this->
setTarget($this->request_wrapper->retrieve(
"ref_id", $this->refinery->kindlyTo()->int()));
   256         $this->
ctrl->setParameter($this, 
'selectMode', self::TARGET_SELECTION);
   268                 $path = $this->tree->getPathId($source_id);
   269                 foreach (
$path as $node_id) {
   270                     if (!in_array($node_id, $node_ids)) {
   271                         $node_ids[] = $node_id;
   279         $this->
ctrl->setReturnByClass(get_class($this->parent_obj), 
'');
   288         $this->
setTabs(self::TAB_GROUP_SC_SELECTION, self::TAB_SELECTION_SOURCE_TREE);
   292         foreach ($this->
getTargets() as $target_ref_id) {
   293             $path = $this->tree->getPathId($target_ref_id);
   294             foreach (
$path as $node_id) {
   295                 if (!in_array($node_id, $node_ids)) {
   296                     $node_ids[] = $node_id;
   304         $this->
ctrl->setReturnByClass(get_class($this->parent_obj), 
'');
   314         $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'msg_copy_clipboard_source'));
   315         $this->
setTabs(self::TAB_GROUP_SC_SELECTION, self::TAB_SELECTION_MEMBERSHIP);
   319             'showSourceSelectionMembership',
   320             'copy_selection_mmbrs'   331         $this->tpl->setContent($cgs->getHTML());
   336         if ($this->obj_definition->isContainer($this->getType())) {
   337             $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'msg_copy_clipboard_container'));
   339             $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'msg_copy_clipboard'));
   343         $exp->setTypeWhiteList([
"root", 
"cat", 
"grp", 
"crs", 
"fold", 
"lso", 
"prg"]);
   344         $exp->setSelectMode(
"target", 
true);
   345         if ($exp->handleCommand()) {
   348         $output = $exp->getHTML();
   351         $t->setFormAction($this->
ctrl->getFormAction($this, 
"saveTarget"));
   352         $primary_button = $this->ui_factory->button()->primary(
   356         $t->addComponent($primary_button);
   359         $clipboard_btn = $this->ui_factory->button()->standard(
   360             $this->
lng->txt(
'obj_insert_into_clipboard'),
   363         $t->addComponent($clipboard_btn);
   365         $cancel_btn = $this->ui_factory->button()->standard(
   366             $this->
lng->txt(
'cancel'),
   369         $t->addComponent($cancel_btn);
   371         $t->setCloseFormTag(
false);
   373         $output = $t->getHTML() . $output;
   375         $t->setCloseFormTag(
true);
   376         $t->setOpenFormTag(
false);
   377         $output .= 
"<br />" . $t->getHTML();
   379         $this->tpl->setContent($output);
   384         if ($this->obj_definition->isContainer($this->getType())) {
   385             return $this->
lng->txt(
'btn_next');
   388         return $this->
lng->txt(
'paste');
   393         return function (
$id) use ($cmd) {
   394             return "document.getElementById('$id')"   395                 . 
'.addEventListener("click", '   396                 . 
'(e) => {e.preventDefault();'   397                 . 
'e.target.setAttribute("name", "cmd[' . $cmd . 
']");'   398                 . 
'e.target.form.requestSubmit(e.target);});';
   404         $this->tpl->addBlockFile(
   407             'tpl.paste_into_multiple_objects.html',
   411         $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'msg_copy_clipboard_source'));
   414             'ilias.php?baseClass=ilRepositoryGUI&cmd=goto',
   415             'paste_copy_repexpand'   417         $exp->setRequiredFormItemPermission(
'visible,read,copy');
   419         $this->
ctrl->setParameter($this, 
'selectMode', self::SOURCE_SELECTION);
   420         $exp->setExpandTarget($this->
ctrl->getLinkTarget($this, 
'showSourceSelectionTree'));
   421         $exp->setTargetGet(
'ref_id');
   422         $exp->setPostVar(
'source');
   427         foreach ([
'cat', 
'root', 
'fold'] as 
$container) {
   428             $exp->removeFormItemForType($container);
   431         if (!$this->request_wrapper->has(
"paste_copy_repexpand")) {
   432             $expanded = $this->tree->readRootId();
   434             $expanded = $this->request_wrapper->retrieve(
"paste_copy_repexpand", $this->
refinery->kindlyTo()->int());
   437         $this->tpl->setVariable(
'FORM_TARGET', 
'_self');
   438         $this->tpl->setVariable(
'FORM_ACTION', $this->
ctrl->getFormAction($this, 
'copySelection'));
   440         $exp->setExpand($expanded);
   443         $output = $exp->getOutput();
   445         $this->tpl->setVariable(
'OBJECT_TREE', $output);
   446         $this->tpl->setVariable(
'CMD_SUBMIT', 
'saveSource');
   447         $this->tpl->setVariable(
'TXT_SUBMIT', $this->
lng->txt(
'btn_next'));
   452         if (!$this->retriever->has(
'target')) {
   453             $this->
ctrl->setParameter($this, 
'selectMode', self::TARGET_SELECTION);
   454             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
   460             $targets = $this->retriever->getArrayOfInt(
'target');
   462             $possible_target = $this->retriever->getMaybeInt(
'target');
   463             $targets = $possible_target === null ? [] : [$possible_target];
   466         if ($targets !== []) {
   468             $this->
ctrl->setParameter($this, 
'target_ids', implode(
'_', $this->
getTargets()));
   469         } elseif (($target = $this->retriever->getMaybeInt(
'target')) !== null) {
   471             $this->
ctrl->setParameter($this, 
'target_ids', implode(
'_', $this->
getTargets()));
   475         foreach ($this->
getSources() as $source_ref_id) {
   476             foreach ($this->
getTargets() as $target_ref_id) {
   479                 $target_object = 
new $target_class_name((
int) $target_ref_id);
   480                 $possible_subtypes = $target_object->getPossibleSubObjects();
   484                 if (!array_key_exists($source_type, (array) $possible_subtypes)) {
   485                     $this->tpl->setOnScreenMessage(
'failure', sprintf(
   486                         $this->
lng->txt(
'msg_obj_may_not_contain_objects_of_type'),
   487                         $this->
lng->txt(
'obj_' . $target_type),
   488                         $this->
lng->txt(
'obj_' . $source_type)
   496         if (count($this->
getSources()) == 1 && $this->obj_definition->isContainer($this->getType())) {
   500             foreach ($this->
getTargets() as $target_ref_id) {
   501                 if ($this->tree->isGrandChild($this->getFirstSource(), (
int) $target_ref_id)) {
   509             if (count($is_child) > 0) {
   510                 $this->tpl->setOnScreenMessage(
   512                     $this->
lng->txt(
"msg_not_in_itself") . 
" " . implode(
',', $is_child)
   540         $this->sub_mode = 
$mode;
   568         $this->sources = $this->
refinery->kindlyTo()->listOf($this->
refinery->kindlyTo()->int())->transform(
   580         if (count($this->sources)) {
   581             return (
int) $this->sources[0];
   594         $this->targets = $this->
refinery->kindlyTo()->listOf($this->
refinery->kindlyTo()->int())->transform(
   606         if (array_key_exists(0, $this->
getTargets())) {
   608             return (
int) $targets[0];
   618         $ilCtrl->returnToParent($this);
   623         $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"obj_inserted_clipboard"), 
true);
   625         $this->clipboard->
setCmd(
"copy");
   626         $this->clipboard->setRefIds($this->
getSources());
   627         $ilCtrl->returnToParent($this);
   632         if ($this->post_wrapper->has(
'tit')) {
   633             $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'wizard_search_list'));
   634             ilSession::set(
'source_query', $this->post_wrapper->retrieve(
"tit", $this->refinery->kindlyTo()->string()));
   638         $this->
form->setValuesByPost();
   640         if (!$this->
form->checkInput()) {
   641             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_no_search_string'), 
true);
   642             $this->
ctrl->returnToParent($this);
   646         $tit = $this->
form->getInput(
'tit');
   651         $query_parser->setMinWordLength(1);
   653         $query_parser->parse();
   654         if (!$query_parser->validate()) {
   655             $this->tpl->setOnScreenMessage(
'failure', $query_parser->getMessage(), 
true);
   656             $this->
ctrl->returnToParent($this);
   661         $object_search->setFilter([$this->retriever->getMaybeString(
'new_type')]);
   662         $res = $object_search->performSearch();
   663         $res->setRequiredPermission(
'copy');
   667             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'search_no_match'), 
true);
   668             $this->
ctrl->returnToParent($this);
   672         $table->setFormAction($this->
ctrl->getFormAction($this));
   674         $table->parseSearchResults(
$results);
   675         $this->tpl->setContent($table->getHTML());
   680         if (!$this->post_wrapper->has(
"source")) {
   681             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
   686         $source = $this->post_wrapper->retrieve(
"source", $this->
refinery->kindlyTo()->int());
   689         $this->
ctrl->setParameter($this, 
'source_id', $source);
   691         foreach ($this->
getSources() as $source_ref_id) {
   693                 $this->tpl->setOnScreenMessage(
'failure', 
$message);
   704         foreach ($this->
getTargets() as $target_ref_id) {
   707             $target_object = 
new $target_class_name($target_ref_id);
   708             $possible_subtypes = $target_object->getPossibleSubObjects();
   712             if (!array_key_exists($source_type, $possible_subtypes)
   713                 && $this->
getSubMode() != self::SUBMODE_CONTENT_ONLY
   714                 && ($source_type !== 
'crs' || $target_type !== 
'crs')
   717                     $this->
lng->txt(
'msg_obj_may_not_contain_objects_of_type'),
   718                     $this->
lng->txt(
'obj_' . $target_type),
   719                     $this->
lng->txt(
'obj_' . $source_type)
   732         $source = $this->retriever->getMaybeInt(
'source');
   733         if ($source === null) {
   734             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
   735             $this->
ctrl->redirect($this, 
'showSourceSelectionMembership');
   741         $this->
ctrl->setParameter($this, 
'source_id', $source);
   748         if (!$this->obj_definition->isContainer($this->getType())) {
   769         $this->tpl->setContent($this->ui_renderer->render($form));
   775         $data = $form->withRequest($this->request)->getData();
   782         $form_action = $this->
ctrl->getFormAction($this, 
'saveCopyPage');
   785             'copy_page' => $this->ui_factory->input()->field()
   787                     $this->
lng->txt(
'cntr_adopt_content')
   789                 ->withOption(
'1', $this->
lng->txt(
'copy_container_page_yes_label'), $this->
lng->txt(
'copy_container_page_yes_byline'))
   790                 ->withOption(
'0', $this->
lng->txt(
'copy_container_page_no_label'))
   792                 ->withAdditionalTransformation($this->
refinery->kindlyTo()->bool())
   795         return $this->ui_factory->input()->container()->form()
   796             ->standard($form_action, $input)
   797             ->withSubmitLabel($this->
lng->txt(
'next'));
   803             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
   808         $this->log->debug(
'Source(s): ' . print_r($this->
getSources(), 
true));
   809         $this->log->debug(
'Target(s): ' . print_r($this->
getTargets(), 
true));
   811         $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt($this->getType() . 
'_copy_threads_info'));
   812         $this->tpl->addJavaScript(
'./Services/CopyWizard/js/ilContainer.js');
   813         $this->tpl->setVariable(
'BODY_ATTRIBUTES', 
'onload="ilDisableChilds(\'cmd\');"');
   818         $this->tpl->setContent($table->getHTML());
   828             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'), 
true);
   829             $this->
ctrl->returnToParent($this);
   843         foreach ($sources as $source_ref_id) {
   848             foreach ($this->
getTargets() as $target_ref_id) {
   849                 if (!$this->rbacsystem->checkAccess(
'create', $target_ref_id, $source_type)) {
   851                         'Permission denied for target_id: ' .
   857                     $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'), 
true);
   858                     $this->
ctrl->returnToParent($this);
   863             if (!$this->
access->checkAccess(
'copy', 
'', $source_ref_id)) {
   864                 $this->log->notice(
'Permission denied for source_ref_id: ' . $source_ref_id . 
' COPY');
   865                 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'), 
true);
   866                 $this->
ctrl->returnToParent($this);
   870             if ($this->obj_definition->isContainer($source_type) and $this->
getSubMode() != self::SUBMODE_CONTENT_ONLY) {
   871                 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'cntr_container_only_on_their_own'), 
true);
   872                 $this->
ctrl->returnToParent($this);
   883         foreach ($sources as $source_ref_id) {
   887             foreach ($this->
getTargets() as $target_ref_id) {
   891                 $wizard_options->saveOwner($this->
user->getId());
   892                 $wizard_options->saveRoot((
int) $source_ref_id);
   893                 $wizard_options->read();
   896                 $new_obj = $orig->cloneObject($target_ref_id, $copy_id);
   899                 $wizard_options->deleteAll();
   900                 $this->parent_obj->callCreationCallback(
   902                     $this->obj_definition,
   903                     $this->retriever->getMaybeInt(
'crtcb', 0)
   908                     $rbac_log_roles = $this->rbacreview->getParentRoleIds($new_obj->getRefId());
   915         $this->clipboard->clear();
   916         $this->log->info(
'Object copy completed.');
   917         if (count($sources) == 1) {
   918             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_duplicated"), 
true);
   919             $ref_id = $new_obj->getRefId();
   921             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"objects_duplicated"), 
true);
   925         $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"objects_duplicated"), 
true);
   931         $this->log->debug(
'Copy container to targets: ' . print_r($_REQUEST, 
true));
   932         $this->log->debug(
'Source(s): ' . print_r($this->
getSources(), 
true));
   933         $this->log->debug(
'Target(s): ' . print_r($this->
getTargets(), 
true));
   940         foreach ($this->
getTargets() as $target_ref_id) {
   944         $this->clipboard->clear();
   947             $this->log->info(
'Object copy completed.');
   948             $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_duplicated"), 
true);
   949             if ($this->
getSubMode() == self::SUBMODE_CONTENT_ONLY) {
   950                 $this->
ctrl->returnToParent($this);
   952             $link = ilLink::_getLink($result[
'ref_id']);
   953             $this->
ctrl->redirectToURL($link);
   955             $this->log->debug(
'Object copy in progress.');
   962         return $this->post_wrapper->has(
'copy_page')
   963             && $this->post_wrapper->retrieve(
'copy_page', $this->
refinery->kindlyTo()->bool());
   972             $source_object->getId()
   975             $orig_page->
copy($target_object->getId(), 
"cont", $target_object->getId());
   981             $new_id = $style_obj->ilClone();
   984             $reuse = $this->container_repo->readReuse($source_object->getRefId());
   985             $this->container_repo->updateReuse($target_object->getRefId(), $reuse);
   992         if ($this->request_wrapper->has(
'ref_id')) {
   993             $ref_id = $this->request_wrapper->retrieve(
   999         $this->
tabs->setBackTarget(
  1000             $this->
lng->txt(
'tab_back_to_repository'),
  1001             (string) $this->
ctrl->getParentReturn($this->parent_obj)
  1009         $progress->setObjectInfo($this->targets_copy_id);
  1012         $link = ilLink::_getLink(
$ref_id);
  1013         $progress->setRedirectionUrl($link);
  1015         $this->tpl->setContent($progress->getHTML());
  1021         $json->percentage = null;
  1022         $json->performed_steps = null;
  1024         $copy_id = $this->retriever->getMaybeInt(
'_copy_id');
  1026         $node = $options->fetchFirstNode();
  1027         $json->current_node_id = 0;
  1028         $json->current_node_title = 
"";
  1029         $json->in_dependencies = 
false;
  1030         if (is_array($node)) {
  1031             $json->current_node_id = $node[
'obj_id'];
  1032             $json->current_node_title = $node[
'title'];
  1034             $node = $options->fetchFirstDependenciesNode();
  1035             if (is_array($node)) {
  1036                 $json->current_node_id = $node[
'obj_id'];
  1037                 $json->current_node_title = $node[
'title'];
  1038                 $json->in_dependencies = 
true;
  1041         $json->required_steps = $options->getRequiredSteps();
  1042         $json->id = $copy_id;
  1044         $this->log->debug(
'Update copy progress: ' . json_encode($json));
  1046         echo json_encode($json);
  1052         if ($this->
getSubMode() != self::SUBMODE_CONTENT_ONLY) {
  1053             if (!$this->rbacsystem->checkAccess(
'create', $target_ref_id, $this->getType())) {
  1055                     'Permission denied for target: ' .
  1061                 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'), 
true);
  1062                 $this->
ctrl->returnToParent($this);
  1067             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'), 
true);
  1068             $this->
ctrl->returnToParent($this);
  1072         if ($this->post_wrapper->has(
"cp_options")) {
  1073             $options = $this->post_wrapper->retrieve(
  1075                 $this->
refinery->kindlyTo()->dictOf(
  1081         $this->log->debug(
'Copy container (sources): ' . print_r($this->
getSources(), 
true));
  1084         $result = $orig->cloneAllObject(
  1095         $this->targets_copy_id[$target_ref_id] = $result[
'copy_id'];
  1097         $new_ref_id = (
int) $result[
'ref_id'];
  1098         if ($new_ref_id > 0) {
  1100             if ($new_obj instanceof 
ilObject) {
  1101                 $this->parent_obj->callCreationCallback(
  1103                     $this->obj_definition,
  1104                     $this->retriever->getMaybeInt(
'crtcb', 0)
  1123             $this->tpl->setVariable($tpl_var, $this->
form->getHTML());
  1141         $this->
form->setTableWidth(
'600px');
  1142         $this->
ctrl->setParameter($this, 
'new_type', $this->
getType());
  1143         $this->
form->setFormAction($this->
ctrl->getFormAction($this));
  1144         $this->
form->setTitle($this->
lng->txt($this->getType() . 
'_copy'));
  1145         $this->
form->addCommandButton(
'searchSource', $this->
lng->txt(
'search_for'));
  1146         $this->
form->addCommandButton(
'cancel', $this->
lng->txt(
'cancel'));
  1150         $tit->setMaxLength(70);
  1151         $tit->setRequired(
true);
  1152         $tit->setInfo($this->
lng->txt(
'wizard_title_info'));
  1153         $this->
form->addItem($tit);
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
ContainerDBRepository $container_repo
 
static get(string $a_var)
 
static gatherFaPa(int $a_ref_id, array $a_role_ids, bool $a_add_action=false)
 
RequestWrapper $request_wrapper
 
getOnLoadCode(string $cmd)
 
adoptContent()
Adopt content (crs in crs, grp in grp, crs in grp or grp in crs) 
 
static getLogger(string $a_component_id)
Get component logger. 
 
buildCopyPageSelectionForm()
 
Explorer for selecting repository 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...
 
showSourceSearch(?string $tpl_var)
Show init screen Normally shown below the create and import form when creating a new object...
 
GUI class for the workflow of copying objects. 
 
initTargetSelection()
Init copy from repository/search list commands. 
 
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory) 
 
ilObjectDefinition $obj_definition
 
This repo stores infos on repository objects that are using booking managers as a service (resource m...
 
saveSourceMembership()
Save selected source from membership screen. 
 
setReturnByClass(string $a_class, string $a_cmd=null)
 
setTabs(int $tab_group, int $active_tab)
 
const TAB_SELECTION_TARGET_TREE
 
ilPasteIntoMultipleItemsExplorer Explorer 
 
const TAB_GROUP_SC_SELECTION
 
withOnLoadCode(Closure $binder)
 
static _lookupObjId(int $ref_id)
 
static writeOwner($obj_id, $style_id)
 
parses the objects.xml it handles the xml-description of all ilias objects 
 
showItemSelection(bool $copy_page=false)
 
getParentObject()
Get parent gui object. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static add(int $a_action, int $a_ref_id, array $a_diff, bool $a_source_ref_id=false)
 
executeNextStepAfterSourceSelection()
 
static _lookupTitle(int $obj_id)
 
ilGlobalTemplateInterface $tpl
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists. 
 
Class ilObjectGUI Basic methods of all Output classes. 
 
ImplementsCreationCallback $parent_obj
 
Interface RequestWrapper. 
 
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id 
 
static _isFinished(int $a_copy_id)
 
static _lookupStandard(int $a_id)
Lookup standard flag. 
 
unsetSession()
Unset session variables. 
 
isCopyingParentPageNeeded()
 
static _allocateCopyId()
Allocate a copy for further entries. 
 
copySingleObject()
Start cloning a single (not container) object. 
 
Manages items in repository clipboard. 
 
static _getObjectsByOperations( $a_obj_type, string $a_operation, int $a_usr_id=0, int $limit=0)
Get all objects of a specific type and check access This function is not recursive, instead it parses the serialized rbac_pa entries. 
 
Base class for all sub item list gui's. 
 
const TAB_SELECTION_MEMBERSHIP
 
static redirect(string $a_script)
 
static getClassByType(string $obj_type)
 
showTargetSelectionTree()
 
showSourceSelectionTree()
 
ilObjectRequestRetriever $retriever
 
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id 
 
form( $class_path, string $cmd, string $submit_caption="")
 
Error Handling & global info handling. 
 
static writeStyleUsage(int $a_obj_id, int $a_style_id)
Write style usage. 
 
ilObjectDataCache $obj_data_cache
 
ClipboardManager $clipboard
 
copyMultipleNonContainer(array $sources)
Copy multiple non container. 
 
getErrorMessageOnDisallowedObjectTypeForTarget(int $ref_id)
 
static lookupObjectStyle(int $a_obj_id)
Lookup object style. 
 
setSource(array $source_ids)
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
const TAB_SELECTION_SOURCE_TREE
 
copyContainer(int $target_ref_id)
 
static _getInstance(int $a_copy_id)
 
copy(int $a_id, string $a_parent_type="", int $a_new_parent_id=0, bool $a_clone_mobs=false, int $obj_copy_id=0, bool $overwrite_existing=true)
Copy page. 
 
ArrayBasedRequestWrapper $post_wrapper
 
static _getMembershipByType(int $a_usr_id, array $a_type, bool $a_only_member_role=false)
get membership by type Get course or group membership 
 
static _lookupType(int $id, bool $reference=false)
 
sourceExists()
Check if there is any source object. 
 
showSourceSelectionMembership()
show target selection membership 
 
static clear(string $a_var)
 
const SUBMODE_CONTENT_ONLY
 
static set(string $a_var, $a_val)
Set a value. 
 
ServerRequestInterface $request
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
setTargets(array $targets)