56 string $a_default_link_type,
57 int $a_default_parent_id,
61 if ($a_default_link_type ===
"PortfolioPage") {
64 $this->tree =
$DIC->repositoryTree();
65 $this->
lng = $DIC->language();
66 $this->
ctrl = $DIC->ctrl();
67 $this->
user = $DIC->user();
73 $this->thumbs_gui =
$DIC->mediaObjects()->internal()->gui()->thumbs();
75 $this->
lng->loadLanguageModule(
"link");
76 $this->
lng->loadLanguageModule(
"content");
77 $this->
lng->loadLanguageModule(
"copg");
78 $this->
ctrl->saveParameter($this, array(
"linkmode",
"link_par_ref_id",
"link_par_obj_id",
79 "link_par_fold_id",
"link_type"));
82 $this->default_link_type = $a_default_link_type;
84 $this->default_parent_ref_id = $a_default_parent_id;
87 $this->default_parent_ref_id = 0;
88 $this->default_parent_obj_id = $a_default_parent_id;
90 $this->default_parent_obj_type = ($this->default_parent_obj_id > 0)
95 $this->parent_ref_id = $this->request->getLinkParentRefId();
96 $this->parent_fold_id = $this->request->getLinkParentFolderId();
97 if ($this->parent_ref_id > 0) {
100 $this->parent_obj_id = $this->request->getLinkParentObjId();
110 if ($this->parent_ref_id > 0 && !
$tree->
isInTree($this->parent_ref_id)) {
114 $this->parent_type = array(
115 "StructureObject" =>
"lm",
116 "PageObject" =>
"lm",
117 "GlossaryItem" =>
"glo",
119 "WikiPage" =>
"wiki",
120 "PortfolioPage" =>
"prtf",
121 "PortfolioTemplatePage" =>
"prtt",
123 "RepositoryItem" =>
"",
128 $this->ltypes = array(
129 "StructureObject" =>
$lng->
txt(
"cont_lk_chapter"),
130 "StructureObject_New" =>
$lng->
txt(
"cont_lk_chapter_new"),
131 "PageObject" =>
$lng->
txt(
"cont_lk_page"),
132 "PageObject_FAQ" =>
$lng->
txt(
"cont_lk_page_faq"),
133 "PageObject_New" =>
$lng->
txt(
"cont_lk_page_new"),
134 "GlossaryItem" =>
$lng->
txt(
"cont_lk_term"),
135 "GlossaryItem_New" =>
$lng->
txt(
"cont_lk_term_new"),
136 "Media" =>
$lng->
txt(
"cont_lk_media_inline"),
137 "Media_Media" =>
$lng->
txt(
"cont_lk_media_media"),
138 "Media_FAQ" =>
$lng->
txt(
"cont_lk_media_faq"),
139 "Media_New" =>
$lng->
txt(
"cont_lk_media_new"),
140 "WikiPage" =>
$lng->
txt(
"cont_wiki_page"),
141 "PortfolioPage" =>
$lng->
txt(
"cont_prtf_page"),
142 "PortfolioTemplatePage" =>
$lng->
txt(
"cont_prtt_page"),
143 "File" =>
$lng->
txt(
"cont_lk_file"),
144 "RepositoryItem" =>
$lng->
txt(
"cont_repository_item"),
145 "User" =>
$lng->
txt(
"cont_user")
147 if (!$this->filter_white_list) {
148 foreach ($this->filter_link_types as
$link_type) {
153 foreach ($this->ltypes as $k => $l) {
154 if (in_array($k, $this->filter_link_types,
true)) {
161 $this->link_type = ($this->request->getLinkType() ===
"")
162 ? $this->default_link_type
163 : $this->request->getLinkType();
164 $ltype_arr = explode(
"_", $this->link_type);
165 $this->base_link_type = $ltype_arr[0];
166 $this->link_target = $ltype_arr[1] ??
"";
172 switch ($this->base_link_type) {
174 case "StructureObject":
178 case "PortfolioPage":
179 case "PortfolioTemplatePage":
180 if ($this->parent_ref_id === 0 && $this->parent_obj_id === 0
181 && $def_type === ($this->parent_type[$this->base_link_type] ??
"")) {
193 $this->set_link_script = $a_script;
198 $this->
return = $a_return;
208 $this->filter_link_types[] = $a_link_type;
216 $this->filter_white_list = $a_white_list;
223 $next_class = $this->
ctrl->getNextClass($this);
225 $cmd = $this->
ctrl->getCmd(
"showLinkHelp");
226 switch ($next_class) {
228 $ret = $this->$cmd();
232 return (
string) $ret;
249 if ($this->
return ===
"") {
250 $this->
ctrl->returnToParent($this);
261 return htmlspecialchars($str, ENT_QUOTES);
275 if ((in_array($this->base_link_type, array(
"GlossaryItem",
"WikiPage",
"PageObject",
"StructureObject"),
true) &&
276 ($this->parent_ref_id === 0))
278 (($this->parent_ref_id > 0) &&
284 if ($ilCtrl->isAsynch()) {
285 $tpl =
new ilGlobalTemplate(
"tpl.link_help_asynch.html",
true,
true,
"components/ILIAS/COPage/IntLink");
286 $tpl->setVariable(
"NEW_LINK_URL", $this->
ctrl->getLinkTarget(
294 $tpl =
new ilGlobalTemplate(
"tpl.link_help.html",
true,
true,
"components/ILIAS/COPage/IntLink");
298 $tpl->setVariable(
"FORMACTION", $this->
ctrl->getFormAction($this,
"changeLinkType",
"",
true));
299 $tpl->setVariable(
"FORMACTION2", $this->
ctrl->getFormAction($this));
300 $tpl->setVariable(
"TXT_HELP_HEADER", $this->
lng->txt(
"cont_link_select"));
301 $tpl->setVariable(
"TXT_TYPE", $this->
lng->txt(
"cont_link_type"));
312 array(
"id" =>
"ilIntLinkTypeSelector")
314 $tpl->setVariable(
"SELECT_TYPE", $select_ltype);
315 $tpl->setVariable(
"CMD_CHANGETYPE",
"changeLinkType");
316 $tpl->setVariable(
"BTN_CHANGETYPE", $this->
lng->txt(
"cont_change_type"));
318 $tpl->setVariable(
"CMD_CLOSE",
"closeLinkHelp");
319 $tpl->setVariable(
"BTN_CLOSE", $this->
lng->txt(
"close"));
321 $chapterRowBlock =
"chapter_row_js";
324 switch ($this->base_link_type) {
330 $ctree = $cont_obj->getLMTree();
331 $nodes = $ctree->getSubTree($ctree->getNodeData($ctree->getRootId()));
332 $tpl->setCurrentBlock(
"chapter_list");
333 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->
lng->txt(
"obj_lm"));
334 $tpl->setVariable(
"TXT_CONT_TITLE", $cont_obj->getTitle());
335 $tpl->setVariable(
"THEAD", $this->
lng->txt(
"copg_pages"));
338 $tpl->setCurrentBlock(
"change_cont_obj");
339 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ",
"changeTargetObject");
340 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->
lng->txt(
"change"));
341 $tpl->parseCurrentBlock();
343 foreach ($nodes as $node) {
344 if ($node[
"type"] ===
"st") {
345 $tpl->setCurrentBlock(
"header_row");
346 $tpl->setVariable(
"TXT_HEADER", $node[
"title"]);
347 $tpl->parseCurrentBlock();
348 $tpl->setCurrentBlock(
"row");
349 $tpl->parseCurrentBlock();
352 if ($node[
"type"] ===
"pg") {
367 $free_pages = array();
368 foreach ($pages as $page) {
369 if (!$ctree->isInTree($page[
"obj_id"])) {
370 $free_pages[] = $page;
373 if (count($free_pages) > 0) {
374 $tpl->setCurrentBlock(
"header_row");
375 $tpl->setVariable(
"TXT_HEADER", $this->
lng->txt(
"cont_free_pages"));
376 $tpl->parseCurrentBlock();
378 foreach ($free_pages as $node) {
391 $tpl->setCurrentBlock(
"chapter_list");
392 $tpl->parseCurrentBlock();
397 case "StructureObject":
407 $ctree = $cont_obj->getLMTree();
408 $nodes = $ctree->getSubTree($ctree->getNodeData($ctree->getRootId()));
409 $tpl->setCurrentBlock(
"chapter_list");
410 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->
lng->txt(
"obj_lm"));
411 $tpl->setVariable(
"TXT_CONT_TITLE", $cont_obj->getTitle());
412 $tpl->setVariable(
"THEAD", $this->
lng->txt(
"link_chapters"));
413 $tpl->setCurrentBlock(
"change_cont_obj");
414 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ",
"changeTargetObject");
415 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->
lng->txt(
"change"));
416 $tpl->parseCurrentBlock();
418 foreach ($nodes as $node) {
419 if ($node[
"type"] ===
"st") {
430 $tpl->setCurrentBlock(
"chapter_list");
431 $tpl->parseCurrentBlock();
439 $terms = $glossary->getTermList();
440 $tpl->setCurrentBlock(
"chapter_list");
441 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->
lng->txt(
"glossary"));
442 $tpl->setVariable(
"TXT_CONT_TITLE", $glossary->getTitle());
443 $tpl->setVariable(
"THEAD", $this->
lng->txt(
"link_terms"));
444 $tpl->setCurrentBlock(
"change_cont_obj");
445 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ",
"changeTargetObject");
446 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->
lng->txt(
"change"));
447 $tpl->parseCurrentBlock();
449 foreach ($terms as $term) {
460 $tpl->setCurrentBlock(
"chapter_list");
461 $tpl->parseCurrentBlock();
468 if ($this->parent_ref_id === 0) {
469 $tpl->setCurrentBlock(
"change_cont_obj");
470 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ",
"changeTargetObject");
471 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->
lng->txt(
"change"));
472 $tpl->parseCurrentBlock();
473 $mobjs = $ilUser->getClipboardObjects(
"mob");
476 foreach ($mobjs as $obj) {
477 $objs[$obj[
"title"] .
":" . $obj[
"id"]] = $obj;
480 $tpl->setCurrentBlock(
"chapter_list");
481 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->
lng->txt(
"cont_media_source"));
482 $tpl->setVariable(
"TXT_CONT_TITLE", $this->
lng->txt(
"cont_personal_clipboard"));
483 $tpl->setVariable(
"THEAD", $this->
lng->txt(
"link_mobs"));
484 $tpl->setVariable(
"COLSPAN",
"2");
486 foreach ($objs as $obj) {
499 $fobjs = $med_pool->getChilds($this->parent_fold_id,
"fold");
501 foreach ($fobjs as $obj) {
502 $f2objs[$obj[
"title"] .
":" . $obj[
"child"]] = $obj;
506 $mobjs = $med_pool->getChilds($this->parent_fold_id,
"mob");
508 foreach ($mobjs as $obj) {
509 $m2objs[$obj[
"title"] .
":" . $obj[
"child"]] = $obj;
514 $objs = array_merge($f2objs, $m2objs);
516 $tpl->setCurrentBlock(
"chapter_list");
517 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->
lng->txt(
"mep"));
518 $tpl->setVariable(
"TXT_CONT_TITLE", $med_pool->getTitle());
519 $tpl->setVariable(
"THEAD", $this->
lng->txt(
"link_mobs"));
520 $tpl->setCurrentBlock(
"change_cont_obj");
521 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ",
"changeTargetObject");
522 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->
lng->txt(
"change"));
523 $tpl->setVariable(
"COLSPAN",
"2");
524 $tpl->parseCurrentBlock();
525 if ($parent_id = $med_pool->getParentId($this->parent_fold_id)) {
526 $tpl->setCurrentBlock(
"icon");
528 $tpl->parseCurrentBlock();
529 $tpl->setCurrentBlock(
"link_row");
530 $tpl->setVariable(
"TXT_CHAPTER",
"..");
531 $this->
ctrl->setParameter($this,
"mep_fold", $parent_id);
532 if ($ilCtrl->isAsynch()) {
533 $tpl->setVariable(
"LINK",
"#");
536 " onclick=\"return il.IntLink.setMepPoolFolder('" . $parent_id .
"');\" "
541 $this->
ctrl->getLinkTarget($this,
"setMedPoolFolder")
544 $tpl->parseCurrentBlock();
545 $tpl->setCurrentBlock(
"row");
546 $tpl->parseCurrentBlock();
548 foreach ($objs as $obj) {
549 if ($obj[
"type"] ===
"fold") {
550 $tpl->setCurrentBlock(
"icon");
552 $tpl->parseCurrentBlock();
553 $tpl->setCurrentBlock(
"link_row");
554 $tpl->setVariable(
"TXT_CHAPTER", $obj[
"title"]);
555 $this->
ctrl->setParameter($this,
"mep_fold", $obj[
"child"]);
556 if ($ilCtrl->isAsynch()) {
557 $tpl->setVariable(
"LINK",
"#");
560 " onclick=\"return il.IntLink.setMepPoolFolder('" . $obj[
"child"] .
"');\" "
565 $this->
ctrl->getLinkTarget($this,
"setMedPoolFolder")
568 $tpl->parseCurrentBlock();
582 $tpl->setCurrentBlock(
"row");
583 $tpl->parseCurrentBlock();
586 $tpl->setCurrentBlock(
"chapter_list");
587 $tpl->parseCurrentBlock();
596 $tpl->setCurrentBlock(
"chapter_list");
597 $tpl->setVariable(
"TXT_CONTENT_OBJECT", $this->
lng->txt(
"obj_wiki"));
599 $tpl->setVariable(
"THEAD", $this->
lng->txt(
"link_wpages"));
600 $tpl->setCurrentBlock(
"change_cont_obj");
601 $tpl->setVariable(
"CMD_CHANGE_CONT_OBJ",
"changeTargetObject");
602 $tpl->setVariable(
"BTN_CHANGE_CONT_OBJ", $this->
lng->txt(
"change"));
603 $tpl->parseCurrentBlock();
605 foreach ($wpages as $wpage) {
616 $tpl->setCurrentBlock(
"chapter_list");
617 $tpl->parseCurrentBlock();
621 case "PortfolioPage":
622 case "PortfolioTemplatePage":
627 $tpl->setCurrentBlock(
"chapter_list");
630 $tpl->setVariable(
"THEAD", $this->
lng->txt(
"copg_pages"));
632 foreach ($ppages as $ppage) {
645 $tpl->setCurrentBlock(
"chapter_list");
646 $tpl->parseCurrentBlock();
650 case "RepositoryItem":
656 if (!isset($this->uploaded_file)) {
666 $tpl->setVariable(
"LINK_HELP_CONTENT", $this->
addUser());
670 if ($ilCtrl->isAsynch()) {
686 $tpl =
new ilTemplate(
"tpl.link_file.html",
true,
true,
"components/ILIAS/COPage/IntLink");
687 if (!is_object($this->uploaded_file)) {
688 $tpl->setCurrentBlock(
"form");
691 $ilCtrl->getFormAction($this,
"saveFileLink",
"",
true)
693 $tpl->setVariable(
"TXT_SELECT_FILE",
$lng->
txt(
"cont_select_file"));
694 $tpl->setVariable(
"TXT_SAVE_LINK",
$lng->
txt(
"cont_create_link"));
695 $tpl->setVariable(
"CMD_SAVE_LINK",
"saveFileLink");
698 $tpl->setVariable(
"INPUT", $fi->getToolbarHTML());
699 $tpl->parseCurrentBlock();
701 $tpl->setCurrentBlock(
"link_js");
707 '[iln dfile=\x22' . $this->uploaded_file->getId() .
'\x22]'
715 $this->uploaded_file->getTitle()
727 if ($_FILES[
"link_file"][
"name"] !=
"") {
729 $fileObj->setType(
"file");
730 $fileObj->setTitle($_FILES[
"link_file"][
"name"]);
731 $fileObj->setDescription(
"");
732 $fileObj->setFileName($_FILES[
"link_file"][
"name"]);
733 $fileObj->setMode(
"filelist");
736 $fileObj->getUploadFile(
737 $_FILES[
"link_file"][
"tmp_name"],
738 $_FILES[
"link_file"][
"name"]
740 $this->uploaded_file = $fileObj;
758 $tpl->setCurrentBlock(
"thumbnail_js");
762 $tpl->setCurrentBlock(
"thumb" . $suff);
765 $this->thumbs_gui->getThumbHtml($a_id)
767 $tpl->parseCurrentBlock();
770 $tpl->setCurrentBlock(
"thumbnail_link");
772 $tpl->setCurrentBlock(
"thumbnail_js");
774 $tpl->parseCurrentBlock();
781 $ctrl->
setParameter($this,
"link_type", $this->request->getLinkType());
782 $base_type = explode(
"_", $this->request->getLinkType())[0];
788 $ctrl->
redirect($this,
"showLinkHelp",
"",
true);
797 $ctrl->
setParameter($this,
"link_par_fold_id", $this->request->getMediaPoolFolder());
798 $ctrl->
redirect($this,
"showLinkHelp",
"",
true);
809 $a_type = $this->parent_type[$this->base_link_type] ??
"";
811 $white = array(
"root",
"cat",
"crs",
"fold",
"grp");
814 $exp->setClickableType($a_type);
815 if ($a_type ===
"prtf") {
817 $exp->setClickableType(
"prtt");
820 $exp->setTypeWhiteList($white);
823 if (!$exp->handleCommand()) {
824 return $exp->getHTML();
835 $ilCtrl = $this->
ctrl;
837 $ilCtrl->setParameter($this,
"link_par_fold_id",
"");
838 if ($this->request->getDo() ===
"set") {
839 $ilCtrl->setParameter($this,
"link_par_ref_id", $this->request->getSelectedId());
840 $ilCtrl->redirect($this,
"showLinkHelp",
"",
true);
844 $ilCtrl->setParameter($this,
"link_type", $this->link_type);
846 $tpl =
new ilTemplate(
"tpl.link_help_explorer.html",
true,
true,
"components/ILIAS/COPage/IntLink");
848 $output = $this->getTargetExplorer();
850 $tpl->setVariable(
"TXT_EXPLORER_HEADER", $this->
lng->txt(
"cont_choose_" . ($this->parent_type[$this->base_link_type] ??
"")));
852 $tpl->setVariable(
"EXPLORER", $output);
853 $tpl->setVariable(
"ACTION", $this->
ctrl->getFormAction($this,
"resetLinkList",
"",
true));
854 $tpl->setVariable(
"BTN_RESET",
"resetLinkList");
855 $tpl->setVariable(
"TXT_RESET", $this->
lng->txt(
"back"));
857 if (($this->parent_type[$this->base_link_type] ??
"") ===
"mep") {
858 $tpl->setCurrentBlock(
"sel_clipboard");
859 $this->
ctrl->setParameter($this,
"do",
"set");
860 if ($ilCtrl->isAsynch()) {
861 $tpl->setVariable(
"LINK_CLIPBOARD",
"#");
864 " onclick=\"return il.IntLink.selectLinkTargetObject('mep', 0, '" . $this->link_type .
"');\" "
867 $tpl->setVariable(
"LINK_CLIPBOARD", $this->
ctrl->getLinkTarget($this,
"changeTargetObject"));
869 $tpl->setVariable(
"TXT_PERS_CLIPBOARD", $this->
lng->txt(
"clipboard"));
870 $tpl->parseCurrentBlock();
873 $tpl->parseCurrentBlock();
885 $ilCtrl = $this->ctrl;
887 $ilCtrl->setParameter($this,
"link_par_fold_id",
"");
890 $exp->setSetLinkTargetScript($this->getSetLinkTargetScript());
892 if (!$exp->handleCommand()) {
893 return $exp->getHTML();
903 $output = $this->selectRepositoryItem();
910 return "il.Util.addOnLoad(function() {il.IntLink.init({url: '$a_url'});});";
924 self::getOnloadCode($a_url)
927 $lng->loadLanguageModule(
"link");
931 $tpl->addJavaScript(
"assets/js/ilExplorer.js");
935 $tpl->addJavascript(
"../components/ILIAS/COPage/IntLink/resources/ilIntLink.js");
937 $tpl->addJavascript(
"assets/js/ilIntLink.js");
941 $tpl->addJavaScript(
"assets/js/Form.js");
943 $mt = self::getModalTemplate();
944 $tpl->addOnLoadCode(
'il.IntLink.setModalTemplate("' . addslashes(json_encode($mt[
"template"])) .
'");');
946 $html =
"<div id='ilIntLinkModal' data-show-signal='" . $mt[
"show"] .
"' data-close-signal='" . $mt[
"close"] .
"'></div>";
958 $modal = $ui->factory()->modal()->roundtrip(
$lng->txt(
"link_link"), $ui->factory()->legacy()->content(
"<div id='ilIntLinkModalContent'></div>"));
959 $modalt[
"show"] = $modal->getShowSignal()->getId();
960 $modalt[
"close"] = $modal->getCloseSignal()->getId();
961 $modalt[
"template"] = $ui->renderer()->renderAsync($modal);
975 string $a_type_short,
977 array $a_anchors = array(),
978 string $a_link_content =
""
980 $chapterRowBlock =
"chapter_row_js";
981 $anchor_row_block =
"anchor_link_js";
983 $target_str = ($this->link_target ===
"")
985 :
" target=\"" . $this->link_target .
"\"";
987 if (count($a_anchors) > 0) {
988 foreach ($a_anchors as $anchor) {
989 if ($this->getSetLinkTargetScript() !==
"") {
1005 $this->prepareJavascriptOutput(
"[iln " . $a_bb_type .
"=\"" . $a_obj_id .
"\"" . $target_str .
" anchor=\"$anchor\"]")
1014 if ($this->getSetLinkTargetScript() !==
"") {
1016 if ($a_type ===
"MediaObject") {
1017 $this->outputThumbnail($tpl, $a_obj_id);
1024 $this->getSetLinkTargetScript(),
1025 "linktype=" . $a_type .
1026 "&linktarget=il__" . $a_type_short .
"_" . $a_obj_id .
1027 "&linktargetframe=" . $this->link_target
1032 if ($a_type ===
"MediaObject") {
1033 $this->outputThumbnail($tpl, $a_obj_id);
1037 if ($a_type ===
"MediaObject" && empty($target_str)) {
1040 $this->prepareJavascriptOutput(
"[iln " . $a_bb_type .
"=\"" . $a_obj_id .
"\"/]")
1046 $this->prepareJavascriptOutput(
"[iln " . $a_bb_type .
"=\"" . $a_obj_id .
"\"" . $target_str .
"]")
1048 $tpl->
setVariable(
"LINK_CONTENT", $a_link_content);
1063 $form = $this->initUserSearchForm();
1064 return $form->getHTML() . $this->getUserSearchResult();
1073 $form->setId(
"link_user_search_form");
1077 $ti->setValue($this->request->getUserSearchStr());
1078 $form->addItem($ti);
1080 $form->addCommandButton(
"searchUser", $this->
lng->txt(
"search"));
1094 if (strlen($this->request->getUserSearchStr()) < 3) {
1095 if (strlen($this->request->getUserSearchStr()) > 0) {
1096 $lng->loadLanguageModule(
"search");
1103 $form = $this->initUserSearchForm();
1104 $form->checkInput();
1107 if (count($users) === 0) {
1111 $f =
$DIC->ui()->factory();
1112 $r =
$DIC->ui()->renderer();
1115 foreach ($users as $user) {
1116 $b =
$f->button()->standard(
$lng->txt(
"insert"),
"#")
1117 ->withOnLoadCode(
function (
$id) use ($user) {
1119 '$("#' .
$id .
"\").click(function(ev) { il.IntLink.addInternalLink('[iln user=\"" .
1124 ->withSections(array(
$b));
1126 $deck =
$f->deck($cards)->withLargeCardsSize();
1128 return $r->renderAsync($deck);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Class ilCtrl provides processing control methods.
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc
redirect(object $a_gui_obj, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc
static init(?ilGlobalTemplateInterface $a_main_tpl=null)
special template class to simplify handling of ITX/PEAR
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
parseCurrentBlock(string $part=self::DEFAULT_BLOCK)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
static _recoverParameters()
Recover parameters from session variables (static)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
renderLink(ilGlobalTemplate $tpl, string $a_title, int $a_obj_id, string $a_type, string $a_type_short, string $a_bb_type, array $a_anchors=array(), string $a_link_content="")
Render internal link item.
refreshRepositorySelector()
Refresh Repository Selector.
StandardGUIRequest $request
setMedPoolFolder()
select media pool folder
getTargetExplorer()
Cange target object.
setFilterWhiteList(bool $a_white_list)
Set filter list as white list (per detault it is a black list)
saveFileLink()
Save file link.
static getOnloadCode(string $a_url)
__construct(string $a_default_link_type, int $a_default_parent_id, bool $a_is_ref=true)
setSetLinkTargetScript(string $a_script)
selectRepositoryItem()
select repository item explorer
prepareJavascriptOutput(string $str)
Prepare output for JS enabled editing.
getUserSearchResult()
Search user.
getFileLinkHTML()
Get HTML for file link.
initUserSearchForm()
Init user search form.
filterLinkType(string $a_link_type)
int $default_parent_obj_id
changeTargetObject(string $a_type="")
Cange target object.
showLinkHelp()
Show link help list.
static getModalTemplate()
string $default_parent_obj_type
setReturn(string $a_return)
static getInitHTML(string $a_url)
Get initialisation HTML to use internal link editing.
outputThumbnail(ilGlobalTemplate $tpl, int $a_id, string $a_mode="")
output thumbnail
string $default_link_type
int $default_parent_ref_id
ILIAS MediaObjects Thumbs ThumbsGUI $thumbs_gui
static searchUsers(string $a_search_str)
Search users.
static getPageList(int $lm_id)
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getPersonalPicturePath(int $usr_id, string $size='small', bool $force_pic=false)
static _lookupLogin(int $a_user_id)
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
static _readAnchors(string $a_parent_type, int $a_page_id, string $a_page_lang="-")
Read anchors of a page.
static getAllPortfolioPages(int $a_portfolio_id)
Get pages of portfolio.
special template class to simplify handling of ITX/PEAR
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...
isInTree(?int $a_node_id)
get all information of a node.
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path=null)
Default behaviour is:
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user
static getSystemMessageHTML(string $a_txt, string $a_type="info")
Get HTML for a system message.
static appendUrlParameterString(string $a_url, string $a_par, bool $xml_style=false)
static redirect(string $a_script)
static getAllWikiPages(int $a_wiki_id, string $lang="-")
if(!file_exists('../ilias.ini.php'))