19declare(strict_types=1);
27use Psr\Http\Message\ServerRequestInterface;
99 $this->
ctrl = $DIC[
'ilCtrl'];
100 $this->tree =
$DIC[
'tree'];
101 $this->
tabs = $DIC[
'ilTabs'];
102 $this->tpl =
$DIC[
"tpl"];
103 $this->obj_definition =
$DIC[
"objDefinition"];
104 $this->obj_data_cache =
$DIC[
"ilObjDataCache"];
105 $this->
access = $DIC->access();
106 $this->
error = $DIC[
"ilErr"];
107 $this->
user = $DIC[
'user']->getLoggedInUser();
108 $this->rbacsystem =
$DIC[
'rbacsystem'];
109 $this->rbacreview =
$DIC[
'rbacreview'];
111 $this->
lng = $DIC[
'lng'];
112 $this->request_wrapper =
$DIC->http()->wrapper()->query();
113 $this->post_wrapper =
$DIC->http()->wrapper()->post();
115 $this->request =
$DIC->http()->request();
116 $this->ui_factory =
$DIC[
'ui.factory'];
117 $this->ui_renderer =
$DIC[
'ui.renderer'];
118 $this->
http = $DIC[
'http'];
124 $this->parent_obj = $parent_gui;
126 $this->
lng->loadLanguageModule(
'search');
127 $this->
lng->loadLanguageModule(
'obj');
128 $this->
ctrl->saveParameter($this,
"crtcb");
130 $this->clipboard =
$DIC
143 $this->
ctrl->getNextClass($this);
144 $cmd = $this->
ctrl->getCmd();
149 protected function init(): void
151 if ($this->retriever->has(
'smode')) {
152 $this->
setSubMode($this->retriever->getMaybeInt(
'smode') ?? 0);
158 if ($this->retriever->has(
'source_ids')) {
159 $this->
setSource(explode(
'_', $this->retriever->getMaybeString(
'source_ids')));
160 $this->
ctrl->setParameter($this,
'source_ids', implode(
'_', $this->
getSources()));
163 if ($this->retriever->has(
'source_id')) {
164 $this->
setSource([$this->retriever->getMaybeInt(
'source_id')]);
165 $this->
ctrl->setParameter($this,
'source_ids', implode(
'_', $this->
getSources()));
175 if ($this->retriever->has(
'new_type')) {
176 $this->
setMode(self::SEARCH_SOURCE);
177 $this->
setType($this->retriever->getMaybeString(
'new_type'));
178 $this->
setTarget($this->request_wrapper->retrieve(
"ref_id", $this->refinery->kindlyTo()->int()));
180 $this->
ctrl->setParameter($this,
'new_type', $this->
getType());
189 elseif ($this->retriever->getMaybeInt(
'selectMode') === self::SOURCE_SELECTION) {
190 $this->
setMode(self::SOURCE_SELECTION);
192 $this->
ctrl->setParameterByClass(get_class($this->parent_obj),
'selectMode', self::SOURCE_SELECTION);
193 $this->
setTarget($this->request_wrapper->retrieve(
"ref_id", $this->refinery->kindlyTo()->int()));
194 $this->
ctrl->setReturnByClass(get_class($this->parent_obj),
'');
197 } elseif ($this->retriever->getMaybeInt(
'selectMode') === self::TARGET_SELECTION) {
198 $this->
setMode(self::TARGET_SELECTION);
199 $this->
ctrl->setReturnByClass(get_class($this->parent_obj),
'');
204 if ($this->retriever->has(
'target_ids')) {
205 $this->
setTargets(explode(
'_', $this->retriever->getMaybeString(
'target_ids')));
212 $this->
lng->loadLanguageModule(
'cntr');
213 $this->
tabs->clearTargets();
214 $this->
tabs->setBackTarget(
215 $this->
lng->txt(
'cancel'),
216 (
string) $this->ctrl->getParentReturn($this->parent_obj)
220 protected function setTabs(
int $tab_group,
int $active_tab): void
222 if ($tab_group == self::TAB_GROUP_SC_SELECTION) {
223 if ($this->
getSubMode() == self::SUBMODE_CONTENT_ONLY) {
224 if ($this->
getMode() == self::SOURCE_SELECTION) {
226 (
string) self::TAB_SELECTION_SOURCE_TREE,
227 $this->
lng->txt(
'cntr_copy_repo_tree'),
228 $this->ctrl->getLinkTarget($this,
'initSourceSelection')
231 (
string) self::TAB_SELECTION_MEMBERSHIP,
232 $this->
lng->txt(
'cntr_copy_crs_grp'),
233 $this->ctrl->getLinkTarget($this,
'showSourceSelectionMembership')
238 $this->
tabs->activateTab((
string) $active_tab);
246 $this->
ctrl->setParameter($this,
'smode', self::SUBMODE_CONTENT_ONLY);
247 $this->
ctrl->setParameter($this,
'selectMode', self::SOURCE_SELECTION);
249 $this->
setSubMode(self::SUBMODE_CONTENT_ONLY);
250 $this->
setMode(self::SOURCE_SELECTION);
251 $this->
setTarget($this->request_wrapper->retrieve(
"ref_id", $this->refinery->kindlyTo()->int()));
261 $this->
ctrl->setParameter($this,
'selectMode', self::TARGET_SELECTION);
273 $path = $this->tree->getPathId($source_id);
274 foreach (
$path as $node_id) {
275 if (!in_array($node_id, $node_ids)) {
276 $node_ids[] = $node_id;
284 $this->
ctrl->setReturnByClass(get_class($this->parent_obj),
'');
293 $this->
setTabs(self::TAB_GROUP_SC_SELECTION, self::TAB_SELECTION_SOURCE_TREE);
297 foreach ($this->
getTargets() as $target_ref_id) {
298 $path = $this->tree->getPathId($target_ref_id);
299 foreach (
$path as $node_id) {
300 if (!in_array($node_id, $node_ids)) {
301 $node_ids[] = $node_id;
309 $this->
ctrl->setReturnByClass(get_class($this->parent_obj),
'');
319 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'msg_copy_clipboard_source'));
320 $this->
setTabs(self::TAB_GROUP_SC_SELECTION, self::TAB_SELECTION_MEMBERSHIP);
324 'showSourceSelectionMembership',
325 'copy_selection_mmbrs'
336 $this->tpl->setContent($cgs->getHTML());
341 if ($this->obj_definition->isContainer($this->getType())) {
342 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'msg_copy_clipboard_container'));
344 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'msg_copy_clipboard'));
348 $exp->setTypeWhiteList([
"root",
"cat",
"grp",
"crs",
"fold",
"lso",
"prg"]);
349 $exp->setSelectMode(
"target",
true);
350 if ($exp->handleCommand()) {
353 $output = $exp->getHTML();
356 $t->setFormAction($this->
ctrl->getFormAction($this,
"saveTarget"));
357 $primary_button = $this->ui_factory->button()->primary(
361 $t->addComponent($primary_button);
364 $clipboard_btn = $this->ui_factory->button()->standard(
365 $this->
lng->txt(
'obj_insert_into_clipboard'),
367 )->withOnLoadCode($this->
getOnLoadCode(
'keepObjectsInClipboard'));
368 $t->addComponent($clipboard_btn);
370 $cancel_btn = $this->ui_factory->button()->standard(
371 $this->
lng->txt(
'cancel'),
374 $t->addComponent($cancel_btn);
376 $t->setCloseFormTag(
false);
378 $output = $t->getHTML() . $output;
380 $t->setCloseFormTag(
true);
381 $t->setOpenFormTag(
false);
382 $output .=
"<br />" . $t->getHTML();
384 $this->tpl->setContent($output);
389 if ($this->obj_definition->isContainer($this->getType())) {
390 return $this->
lng->txt(
'btn_next');
393 return $this->
lng->txt(
'paste');
398 return function (
$id) use ($cmd) {
399 return "document.getElementById('$id')"
400 .
'.addEventListener("click", '
401 .
'(e) => {e.preventDefault();'
402 .
'e.target.setAttribute("name", "cmd[' . $cmd .
']");'
403 .
'e.target.form.requestSubmit(e.target);});';
409 $this->tpl->addBlockFile(
412 'tpl.paste_into_multiple_objects.html',
413 "components/ILIAS/ILIASObject"
416 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'msg_copy_clipboard_source'));
419 'ilias.php?baseClass=ilRepositoryGUI&cmd=goto',
420 'paste_copy_repexpand'
422 $exp->setRequiredFormItemPermission(
'visible,read,copy');
424 $this->
ctrl->setParameter($this,
'selectMode', self::SOURCE_SELECTION);
425 $exp->setExpandTarget($this->
ctrl->getLinkTarget($this,
'showSourceSelectionTree'));
426 $exp->setTargetGet(
'ref_id');
427 $exp->setPostVar(
'source');
432 foreach ([
'cat',
'root',
'fold'] as
$container) {
436 if (!$this->request_wrapper->has(
"paste_copy_repexpand")) {
437 $expanded = $this->tree->readRootId();
439 $expanded = $this->request_wrapper->retrieve(
"paste_copy_repexpand", $this->
refinery->kindlyTo()->int());
442 $this->tpl->setVariable(
'FORM_TARGET',
'_self');
443 $this->tpl->setVariable(
'FORM_ACTION', $this->
ctrl->getFormAction($this,
'copySelection'));
445 $exp->setExpand($expanded);
448 $output = $exp->getOutput();
450 $this->tpl->setVariable(
'OBJECT_TREE', $output);
451 $this->tpl->setVariable(
'CMD_SUBMIT',
'saveSource');
452 $this->tpl->setVariable(
'TXT_SUBMIT', $this->
lng->txt(
'btn_next'));
457 if (!$this->retriever->has(
'target')) {
458 $this->
ctrl->setParameter($this,
'selectMode', self::TARGET_SELECTION);
459 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
465 $targets = $this->retriever->getArrayOfInt(
'target');
467 $possible_target = $this->retriever->getMaybeInt(
'target');
468 $targets = $possible_target ===
null ? [] : [$possible_target];
473 $this->
ctrl->setParameter($this,
'target_ids', implode(
'_', $this->
getTargets()));
474 } elseif (($target = $this->retriever->getMaybeInt(
'target')) !==
null) {
476 $this->
ctrl->setParameter($this,
'target_ids', implode(
'_', $this->
getTargets()));
480 foreach ($this->
getSources() as $source_ref_id) {
481 foreach ($this->
getTargets() as $target_ref_id) {
484 $target_object =
new $target_class_name((
int) $target_ref_id);
485 $possible_subtypes = $target_object->getPossibleSubObjects();
489 if (!array_key_exists($source_type, (array) $possible_subtypes)) {
490 $this->tpl->setOnScreenMessage(
'failure', sprintf(
491 $this->
lng->txt(
'msg_obj_may_not_contain_objects_of_type'),
492 $this->lng->txt(
'obj_' . $target_type),
493 $this->lng->txt(
'obj_' . $source_type)
501 if (count($this->
getSources()) == 1 && $this->obj_definition->isContainer($this->getType())) {
505 foreach ($this->
getTargets() as $target_ref_id) {
506 if ($this->tree->isGrandChild($this->getFirstSource(), (
int) $target_ref_id)) {
514 if (count($is_child) > 0) {
515 $this->tpl->setOnScreenMessage(
517 $this->
lng->txt(
"msg_not_in_itself") .
" " . implode(
',', $is_child)
545 $this->sub_mode =
$mode;
573 $this->sources = $this->
refinery->kindlyTo()->listOf($this->
refinery->kindlyTo()->int())->transform(
585 if (count($this->sources)) {
586 return (
int) $this->sources[0];
599 $this->targets = $this->
refinery->kindlyTo()->listOf($this->
refinery->kindlyTo()->int())->transform(
611 if (array_key_exists(0, $this->
getTargets())) {
613 return (
int) $targets[0];
623 $ilCtrl->returnToParent($this);
628 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"obj_inserted_clipboard"),
true);
630 $this->clipboard->setCmd(
"copy");
631 $this->clipboard->setRefIds($this->
getSources());
637 if ($this->post_wrapper->has(
'tit')) {
638 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'wizard_search_list'));
639 ilSession::set(
'source_query', $this->post_wrapper->retrieve(
"tit", $this->refinery->kindlyTo()->string()));
643 $this->
form->setValuesByPost();
645 if (!$this->
form->checkInput()) {
646 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_no_search_string'),
true);
647 $this->
ctrl->returnToParent($this);
651 $tit = $this->
form->getInput(
'tit');
656 $query_parser->setMinWordLength(1);
658 $query_parser->parse();
659 if (!$query_parser->validate()) {
660 $this->tpl->setOnScreenMessage(
'failure', $query_parser->getMessage(),
true);
661 $this->
ctrl->returnToParent($this);
666 $object_search->setFilter([$this->retriever->getMaybeString(
'new_type')]);
667 $res = $object_search->performSearch();
668 $res->setRequiredPermission(
'copy');
672 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'search_no_match'),
true);
673 $this->
ctrl->returnToParent($this);
677 $table->setFormAction($this->
ctrl->getFormAction($this));
679 $table->parseSearchResults(
$results);
680 $this->tpl->setContent($table->getHTML());
685 if (!$this->post_wrapper->has(
"source")) {
686 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
691 $source = $this->post_wrapper->retrieve(
"source", $this->
refinery->kindlyTo()->int());
694 $this->
ctrl->setParameter($this,
'source_id', $source);
696 foreach ($this->
getSources() as $source_ref_id) {
698 $this->tpl->setOnScreenMessage(
'failure', $message);
709 foreach ($this->
getTargets() as $target_ref_id) {
712 $target_object =
new $target_class_name($target_ref_id);
713 $possible_subtypes = $target_object->getPossibleSubObjects();
717 if (!array_key_exists($source_type, $possible_subtypes)
718 && $this->
getSubMode() != self::SUBMODE_CONTENT_ONLY
719 && ($source_type !==
'crs' || $target_type !==
'crs')
722 $this->
lng->txt(
'msg_obj_may_not_contain_objects_of_type'),
723 $this->lng->txt(
'obj_' . $target_type),
724 $this->lng->txt(
'obj_' . $source_type)
737 $source = $this->retriever->getMaybeInt(
'source');
738 if ($source ===
null) {
739 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
740 $this->
ctrl->redirect($this,
'showSourceSelectionMembership');
746 $this->
ctrl->setParameter($this,
'source_id', $source);
753 if (!$this->obj_definition->isContainer($this->getType())) {
774 $this->tpl->setContent($this->ui_renderer->render(
$form));
780 $data = $form->withRequest($this->request)->getData();
787 $form_action = $this->
ctrl->getFormAction($this,
'saveCopyPage');
790 'copy_page' => $this->ui_factory->input()->field()
792 $this->
lng->txt(
'cntr_adopt_content')
794 ->withOption(
'1', $this->
lng->txt(
'copy_container_page_yes_label'), $this->lng->txt(
'copy_container_page_yes_byline'))
795 ->withOption(
'0', $this->
lng->txt(
'copy_container_page_no_label'))
797 ->withAdditionalTransformation($this->
refinery->kindlyTo()->bool())
800 return $this->ui_factory->input()->container()->form()
801 ->standard($form_action, $input)
802 ->withSubmitLabel($this->
lng->txt(
'next'));
808 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
813 $this->log->debug(
'Source(s): ' . print_r($this->
getSources(),
true));
814 $this->log->debug(
'Target(s): ' . print_r($this->
getTargets(),
true));
816 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt($this->getType() .
'_copy_threads_info'));
817 $this->tpl->addJavaScript(
'assets/js/ilContainer.js');
818 $this->tpl->setVariable(
'BODY_ATTRIBUTES',
'onload="ilDisableChilds(\'cmd\');"');
823 $this->tpl->setContent($table->getHTML());
833 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'),
true);
834 $this->
ctrl->returnToParent($this);
848 foreach (
$sources as $source_ref_id) {
853 foreach ($this->
getTargets() as $target_ref_id) {
854 if (!$this->rbacsystem->checkAccess(
'create', $target_ref_id, $source_type)) {
856 'Permission denied for target_id: ' .
862 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
863 $this->
ctrl->returnToParent($this);
868 if (!$this->
access->checkAccess(
'copy',
'', $source_ref_id)) {
869 $this->log->notice(
'Permission denied for source_ref_id: ' . $source_ref_id .
' COPY');
870 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
871 $this->
ctrl->returnToParent($this);
875 if ($this->obj_definition->isContainer($source_type) and $this->getSubMode() != self::SUBMODE_CONTENT_ONLY) {
876 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'cntr_container_only_on_their_own'),
true);
877 $this->
ctrl->returnToParent($this);
888 foreach (
$sources as $source_ref_id) {
892 foreach ($this->
getTargets() as $target_ref_id) {
896 $wizard_options->saveOwner($this->
user->getId());
897 $wizard_options->saveRoot((
int) $source_ref_id);
898 $wizard_options->read();
901 $new_obj = $orig->cloneObject($target_ref_id, $copy_id);
904 $wizard_options->deleteAll();
905 $this->parent_obj->callCreationCallback(
907 $this->obj_definition,
908 $this->retriever->getMaybeInt(
'crtcb', 0)
913 $rbac_log_roles = $this->rbacreview->getParentRoleIds($new_obj->getRefId());
920 $this->clipboard->clear();
921 $this->log->info(
'Object copy completed.');
923 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_duplicated"),
true);
924 $ref_id = $new_obj->getRefId();
926 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"objects_duplicated"),
true);
930 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"objects_duplicated"),
true);
936 $this->log->debug(
'Copy container to targets: ' . print_r($_REQUEST,
true));
937 $this->log->debug(
'Source(s): ' . print_r($this->
getSources(),
true));
938 $this->log->debug(
'Target(s): ' . print_r($this->
getTargets(),
true));
945 foreach ($this->
getTargets() as $target_ref_id) {
949 $this->clipboard->clear();
952 $this->log->info(
'Object copy completed.');
953 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"object_duplicated"),
true);
954 if ($this->
getSubMode() == self::SUBMODE_CONTENT_ONLY) {
955 $this->
ctrl->returnToParent($this);
957 $link = ilLink::_getLink($result[
'ref_id']);
958 $this->
ctrl->redirectToURL($link);
960 $this->log->debug(
'Object copy in progress.');
967 return $this->post_wrapper->has(
'copy_page')
968 && $this->post_wrapper->retrieve(
'copy_page', $this->
refinery->kindlyTo()->bool());
977 $source_object->getId()
980 $orig_page->copy($target_object->getId(),
"cont", $target_object->getId());
984 if ($style_id <= 0) {
992 $new_id = $style_obj->ilClone();
995 $reuse = $this->container_repo->readReuse($source_object->getRefId());
996 $this->container_repo->updateReuse($target_object->getRefId(), $reuse);
1002 if ($this->request_wrapper->has(
'ref_id')) {
1003 $ref_id = $this->request_wrapper->retrieve(
1009 $this->
tabs->setBackTarget(
1010 $this->
lng->txt(
'tab_back_to_repository'),
1011 (
string) $this->ctrl->getParentReturn($this->parent_obj)
1022 $progress->setObjectInfo($this->targets_copy_id);
1025 $link = ilLink::_getLink(
$ref_id);
1026 $progress->setRedirectionUrl($link);
1028 $this->tpl->setContent($progress->getHTML());
1033 $max_steps = $this->retriever->getMaybeInt(
'_max_steps');
1034 $copy_id = $this->retriever->getMaybeInt(
'_copy_id');
1036 $required_steps =
$options->getRequiredSteps();
1038 if ($required_steps === 0) {
1039 $state = $this->ui_factory->progress()->state()->bar()
1040 ->success($this->
lng->txt(
'obj_copy_progress_success'));
1041 $this->log->debug(
'Update copy progress: 100%');
1043 $completed_steps = $max_steps - $required_steps;
1044 $percentage = (
int) min(
1045 floor(($completed_steps / $max_steps) * 100),
1048 $state = $this->ui_factory->progress()->state()->bar()
1049 ->determinate($percentage);
1050 $this->log->debug(
"Update copy progress: {$percentage}%");
1053 $html = $this->ui_renderer->renderAsync($state);
1055 $this->
http->saveResponse(
1056 $this->
http->response()
1057 ->withHeader(
'Content-Type',
'text/html; charset=utf-8')
1058 ->withBody(Streams::ofString($html))
1060 $this->
http->sendResponse();
1061 $this->
http->close();
1066 if ($this->
getSubMode() != self::SUBMODE_CONTENT_ONLY) {
1067 if (!$this->rbacsystem->checkAccess(
'create', $target_ref_id, $this->getType())) {
1069 'Permission denied for target: ' .
1075 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'),
true);
1076 $this->
ctrl->returnToParent($this);
1081 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'),
true);
1082 $this->
ctrl->returnToParent($this);
1086 if ($this->post_wrapper->has(
"cp_options")) {
1087 $options = $this->post_wrapper->retrieve(
1089 $this->
refinery->kindlyTo()->dictOf(
1090 $this->refinery->kindlyTo()->dictOf($this->refinery->kindlyTo()->string())
1095 $this->log->debug(
'Copy container (sources): ' . print_r($this->
getSources(),
true));
1098 $result = $orig->cloneAllObject(
1109 $this->targets_copy_id[$target_ref_id] = $result[
'copy_id'];
1111 $new_ref_id = (
int) $result[
'ref_id'];
1112 if ($new_ref_id > 0) {
1114 if ($new_obj instanceof
ilObject) {
1115 $this->parent_obj->callCreationCallback(
1117 $this->obj_definition,
1118 $this->retriever->getMaybeInt(
'crtcb', 0)
1137 $this->tpl->setVariable($tpl_var, $this->
form->getHTML());
1147 $this->
form->setTableWidth(
'600px');
1148 $this->
ctrl->setParameter($this,
'new_type', $this->
getType());
1149 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
1150 $this->
form->setTitle($this->
lng->txt($this->getType() .
'_copy'));
1151 $this->
form->addCommandButton(
'searchSource', $this->
lng->txt(
'search_for'));
1152 $this->
form->addCommandButton(
'cancel', $this->
lng->txt(
'cancel'));
1156 $tit->setMaxLength(70);
1157 $tit->setRequired(
true);
1158 $tit->setInfo($this->
lng->txt(
'wizard_title_info'));
1159 $this->
form->addItem($tit);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Builds a Color from either hex- or rgb values.
Stream factory which enables the user to create streams without the knowledge of the concrete class.
Class ArrayBasedRequestWrapper.
Manages items in repository clipboard.
This repo stores infos on repository objects that are using booking managers as a service (resource m...
static _allocateCopyId()
Allocate a copy for further entries.
static _isFinished(int $a_copy_id)
static _getInstance(int $a_copy_id)
Class ilCtrl provides processing control methods.
setReturnByClass(string $a_class, ?string $a_cmd=null)
@inheritDoc
returnToParent(object $a_gui_obj, ?string $a_anchor=null)
@inheritDoc
Error Handling & global info handling.
static getLogger(string $a_component_id)
Get component logger.
Component logger with individual log levels by component id.
static _lookupStandard(int $a_id)
Lookup standard flag.
static writeStyleUsage(int $a_obj_id, int $a_style_id)
Write style usage.
static writeOwner($obj_id, $style_id)
static lookupObjectStyle(int $a_obj_id)
Lookup object style.
GUI class for the workflow of copying objects.
GUI class for the workflow of copying objects.
const TAB_SELECTION_MEMBERSHIP
unsetSession()
Unset session variables.
isCopyingParentPageNeeded()
ServerRequestInterface $request
copyMultipleNonContainer(array $sources)
Copy multiple non container.
executeNextStepAfterSourceSelection()
ContainerDBRepository $container_repo
setTabs(int $tab_group, int $active_tab)
ilObjectDefinition $obj_definition
initTargetSelection()
Init copy from repository/search list commands.
const TAB_SELECTION_SOURCE_TREE
ilObjectRequestRetriever $retriever
setSource(array $source_ids)
ilObjectDataCache $obj_data_cache
buildCopyPageSelectionForm()
getParentObject()
Get parent gui object.
const SUBMODE_CONTENT_ONLY
copySingleObject()
Start cloning a single (not container) object.
const TAB_GROUP_SC_SELECTION
showSourceSelectionTree()
ilGlobalTemplateInterface $tpl
saveSourceMembership()
Save selected source from membership screen.
ClipboardManager $clipboard
ImplementsCreationCallback $parent_obj
copyContainer(int $target_ref_id)
getErrorMessageOnDisallowedObjectTypeForTarget(int $ref_id)
getOnLoadCode(string $cmd)
ArrayBasedRequestWrapper $post_wrapper
showSourceSearch(?string $tpl_var)
Show init screen Normally shown below the create and import form when creating a new object.
adoptContent()
Adopt content (crs in crs, grp in grp, crs in grp or grp in crs)
showSourceSelectionMembership()
show target selection membership
showItemSelection(bool $copy_page=false)
showTargetSelectionTree()
setTargets(array $targets)
RequestWrapper $request_wrapper
const TAB_SELECTION_TARGET_TREE
Table gui for copy progress.
Presentation of search results.
parses the objects.xml it handles the xml-description of all ilias objects
static getClassByType(string $obj_type)
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilObjectGUI Basic methods of all Output classes.
Base class for all sub item list gui's.
Class ilObject Basic functions for all objects.
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
static _getMembershipByType(int $a_usr_id, array $a_type, bool $a_only_member_role=false)
get membership by type Get course or group membership
ilPasteIntoMultipleItemsExplorer Explorer
static add(int $action, int $ref_id, array $diff, bool $source_ref_id=false)
static gatherFaPa(int $ref_id, array $role_ids, bool $add_action=false)
class ilRbacReview Contains Review functions of core Rbac.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
Explorer for selecting repository items.
static get(string $a_var)
static clear(string $a_var)
static set(string $a_var, $a_val)
Set a value.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text property in a property form.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
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 redirect(string $a_script)
Interface GlobalHttpState.
Interface RequestWrapper.
An entity that renders components to a string output.
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
form(?array $class_path, string $cmd, string $submit_caption="")