ILIAS  release_8 Revision v8.24
ilInternalLinkGUI Class Reference

Internal link selector. More...

+ Collaboration diagram for ilInternalLinkGUI:

Public Member Functions

 __construct (string $a_default_link_type, int $a_default_parent_id, bool $a_is_ref=true)
 
 init ()
 
 setSetLinkTargetScript (string $a_script)
 
 setReturn (string $a_return)
 
 getSetLinkTargetScript ()
 
 filterLinkType (string $a_link_type)
 
 setFilterWhiteList (bool $a_white_list)
 Set filter list as white list (per detault it is a black list) More...
 
 executeCommand ()
 
 resetLinkList ()
 
 closeLinkHelp ()
 
 prepareJavascriptOutput (string $str)
 Prepare output for JS enabled editing. More...
 
 showLinkHelp ()
 Show link help list. More...
 
 getFileLinkHTML ()
 Get HTML for file link. More...
 
 saveFileLink ()
 Save file link. More...
 
 outputThumbnail (ilGlobalTemplate $tpl, int $a_id, string $a_mode="")
 output thumbnail More...
 
 changeLinkType ()
 
 setMedPoolFolder ()
 select media pool folder More...
 
 getTargetExplorer ()
 Cange target object. More...
 
 changeTargetObject (string $a_type="")
 Cange target object. More...
 
 selectRepositoryItem ()
 select repository item explorer More...
 
 refreshRepositorySelector ()
 Refresh Repository Selector. More...
 
 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. More...
 
 addUser ()
 Add user. More...
 
 initUserSearchForm ()
 Init user search form. More...
 
 getUserSearchResult ()
 Search user. More...
 

Static Public Member Functions

static getOnloadCode (string $a_url)
 
static getInitHTML (string $a_url)
 Get initialisation HTML to use internal link editing. More...
 

Data Fields

string $set_link_script = ""
 
ilCtrl $ctrl
 

Protected Attributes

ilObjFile $uploaded_file = null
 
int $parent_fold_id
 
string $default_parent_obj_type
 
StandardGUIRequest $request
 
string $return
 
string $default_link_type = ""
 
int $default_parent_ref_id = 0
 
int $default_parent_obj_id = 0
 
int $parent_ref_id = 0
 
int $parent_obj_id = 0
 
string $link_type = ""
 
string $link_target = ""
 
string $base_link_type = ""
 
array $ltypes = []
 
array $parent_type = []
 
bool $filter_white_list = false
 
array $filter_link_types = []
 
ilTree $tree
 
ilLanguage $lng
 
ilObjUser $user
 

Detailed Description

Internal link selector.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 25 of file class.ilInternalLinkGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilInternalLinkGUI::__construct ( string  $a_default_link_type,
int  $a_default_parent_id,
bool  $a_is_ref = true 
)

Definition at line 53 of file class.ilInternalLinkGUI.php.

57 {
58 global $DIC;
59 $this->tree = $DIC->repositoryTree();
60 $this->lng = $DIC->language();
61 $this->ctrl = $DIC->ctrl();
62 $this->user = $DIC->user();
63
64 $this->request = new StandardGUIRequest(
65 $DIC->http(),
66 $DIC->refinery()
67 );
68
69 $this->lng->loadLanguageModule("link");
70 $this->lng->loadLanguageModule("content");
71 $this->ctrl->saveParameter($this, array("linkmode", "link_par_ref_id", "link_par_obj_id",
72 "link_par_fold_id", "link_type"));
73
74 // default type and parent
75 $this->default_link_type = $a_default_link_type;
76 if ($a_is_ref) {
77 $this->default_parent_ref_id = $a_default_parent_id;
78 $this->default_parent_obj_id = ilObject::_lookupObjId($a_default_parent_id);
79 } else {
80 $this->default_parent_ref_id = 0;
81 $this->default_parent_obj_id = $a_default_parent_id;
82 }
83 $this->default_parent_obj_type = ($this->default_parent_obj_id > 0)
84 ? ilObject::_lookupType($this->default_parent_obj_id)
85 : "";
86
87 // current parent object
88 $this->parent_ref_id = $this->request->getLinkParentRefId();
89 $this->parent_fold_id = $this->request->getLinkParentFolderId(); // e.g. media pool folder
90 if ($this->parent_ref_id > 0) {
91 $this->parent_obj_id = ilObject::_lookupObjId($this->parent_ref_id);
92 } else {
93 $this->parent_obj_id = $this->request->getLinkParentObjId();
94 }
95 }
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28

References $DIC, ilObject\_lookupObjId(), ilObject\_lookupType(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ addUser()

ilInternalLinkGUI::addUser ( )

Add user.

Definition at line 1038 of file class.ilInternalLinkGUI.php.

1038 : string
1039 {
1040 $form = $this->initUserSearchForm();
1041 return $form->getHTML() . $this->getUserSearchResult();
1042 }
initUserSearchForm()
Init user search form.

Referenced by showLinkHelp().

+ Here is the caller graph for this function:

◆ changeLinkType()

ilInternalLinkGUI::changeLinkType ( )

Definition at line 776 of file class.ilInternalLinkGUI.php.

776 : void
777 {
779
780 $ctrl->setParameter($this, "link_type", $this->request->getLinkType());
781 $base_type = explode("_", $this->request->getLinkType())[0];
782 if ($this->parent_type[$base_type] !== ilObject::_lookupType($this->parent_ref_id, true)) {
783 $ctrl->setParameter($this, "link_par_ref_id", 0);
784 $ctrl->setParameter($this, "link_par_obj_id", 0);
785 }
786
787 $ctrl->redirect($this, "showLinkHelp", "", true);
788 }
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
@inheritDoc
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc

References ilObject\_lookupType(), ilCtrl\redirect(), and ilCtrl\setParameter().

+ Here is the call graph for this function:

◆ changeTargetObject()

ilInternalLinkGUI::changeTargetObject ( string  $a_type = "")

Cange target object.

Definition at line 831 of file class.ilInternalLinkGUI.php.

833 : void {
834 $ilCtrl = $this->ctrl;
835
836 $ilCtrl->setParameter($this, "link_par_fold_id", "");
837 if ($this->request->getDo() === "set") {
838 $ilCtrl->setParameter($this, "link_par_ref_id", $this->request->getSelectedId());
839 $ilCtrl->redirect($this, "showLinkHelp", "", true);
840 return;
841 }
842
843 $ilCtrl->setParameter($this, "link_type", $this->link_type);
844
845 $tpl = new ilTemplate("tpl.link_help_explorer.html", true, true, "Services/Link");
846
847 $output = $this->getTargetExplorer();
848
849 $tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("cont_choose_" . ($this->parent_type[$this->base_link_type] ?? "")));
850
851 $tpl->setVariable("EXPLORER", $output);
852 $tpl->setVariable("ACTION", $this->ctrl->getFormAction($this, "resetLinkList", "", true));
853 $tpl->setVariable("BTN_RESET", "resetLinkList");
854 $tpl->setVariable("TXT_RESET", $this->lng->txt("back"));
855
856 if (($this->parent_type[$this->base_link_type] ?? "") === "mep") {
857 $tpl->setCurrentBlock("sel_clipboard");
858 $this->ctrl->setParameter($this, "do", "set");
859 if ($ilCtrl->isAsynch()) {
860 $tpl->setVariable("LINK_CLIPBOARD", "#");
861 $tpl->setVariable(
862 "CLIPBOARD_ONCLICK",
863 " onclick=\"return il.IntLink.selectLinkTargetObject('mep', 0, '" . $this->link_type . "');\" "
864 );
865 } else {
866 $tpl->setVariable("LINK_CLIPBOARD", $this->ctrl->getLinkTarget($this, "changeTargetObject"));
867 }
868 $tpl->setVariable("TXT_PERS_CLIPBOARD", $this->lng->txt("clipboard"));
869 $tpl->parseCurrentBlock();
870 }
871
872 $tpl->parseCurrentBlock();
873
874 echo $tpl->get();
875 exit;
876 }
getTargetExplorer()
Cange target object.
special template class to simplify handling of ITX/PEAR
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
exit
Definition: login.php:28

Referenced by showLinkHelp().

+ Here is the caller graph for this function:

◆ closeLinkHelp()

ilInternalLinkGUI::closeLinkHelp ( )

Definition at line 240 of file class.ilInternalLinkGUI.php.

240 : void
241 {
242 if ($this->return === "") {
243 $this->ctrl->returnToParent($this);
244 } else {
245 ilUtil::redirect($this->return);
246 }
247 }
static redirect(string $a_script)

References ILIAS\Repository\ctrl(), and ilUtil\redirect().

+ Here is the call graph for this function:

◆ executeCommand()

ilInternalLinkGUI::executeCommand ( )

Definition at line 213 of file class.ilInternalLinkGUI.php.

213 : string
214 {
215 $this->init();
216 $next_class = $this->ctrl->getNextClass($this);
217
218 $cmd = $this->ctrl->getCmd("showLinkHelp");
219 switch ($next_class) {
220 default:
221 $ret = $this->$cmd();
222 break;
223 }
224
225 return (string) $ret;
226 }

References ILIAS\Repository\ctrl(), and init().

+ Here is the call graph for this function:

◆ filterLinkType()

ilInternalLinkGUI::filterLinkType ( string  $a_link_type)

Definition at line 199 of file class.ilInternalLinkGUI.php.

199 : void
200 {
201 $this->filter_link_types[] = $a_link_type;
202 }

◆ getFileLinkHTML()

ilInternalLinkGUI::getFileLinkHTML ( )

Get HTML for file link.

Definition at line 675 of file class.ilInternalLinkGUI.php.

675 : string
676 {
678 $ilCtrl = $this->ctrl;
679
680 $tpl = new ilTemplate("tpl.link_file.html", true, true, "Services/Link");
681 if (!is_object($this->uploaded_file)) {
682 $tpl->setCurrentBlock("form");
683 $tpl->setVariable(
684 "FORM_ACTION",
685 $ilCtrl->getFormAction($this, "saveFileLink", "", true)
686 );
687 $tpl->setVariable("TXT_SELECT_FILE", $lng->txt("cont_select_file"));
688 $tpl->setVariable("TXT_SAVE_LINK", $lng->txt("cont_create_link"));
689 $tpl->setVariable("CMD_SAVE_LINK", "saveFileLink");
690 $fi = new ilFileInputGUI("", "link_file");
691 $fi->setSize(15);
692 $tpl->setVariable("INPUT", $fi->getToolbarHTML());
693 $tpl->parseCurrentBlock();
694 } else {
695 $tpl->setCurrentBlock("link_js");
696 // $tpl->setVariable("LINK_FILE",
697 // $this->prepareJavascriptOutput("[iln dfile=\"".$this->uploaded_file->getId()."\"] [/iln]")
698 // );
699 $tpl->setVariable(
700 "TAG_B",
701 '[iln dfile=\x22' . $this->uploaded_file->getId() . '\x22]'
702 );
703 $tpl->setVariable(
704 "TAG_E",
705 "[/iln]"
706 );
707 $tpl->setVariable(
708 "TXT_FILE",
709 $this->uploaded_file->getTitle()
710 );
711 // $tpl->parseCurrentBlock();
712 }
713 return $tpl->get();
714 }
This class represents a file property in a property form.
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...

References $ctrl, $lng, $tpl, and ilLanguage\txt().

Referenced by showLinkHelp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInitHTML()

static ilInternalLinkGUI::getInitHTML ( string  $a_url)
static

Get initialisation HTML to use internal link editing.

Definition at line 915 of file class.ilInternalLinkGUI.php.

915 : string
916 {
917 global $DIC;
918
919 $lng = $DIC->language();
920 $tpl = $DIC["tpl"];
921
922 $tpl->addOnLoadCode(
923 self::getOnloadCode($a_url)
924 );
925
926 $lng->loadLanguageModule("link");
927
928 $tpl->addJavaScript("./Services/UIComponent/Explorer/js/ilExplorer.js");
931
932 $tpl->addJavascript("./Services/Link/js/ilIntLink.js");
933 // #18721
934 $tpl->addJavaScript("Services/Form/js/Form.js");
935
936 $modal = ilModalGUI::getInstance();
937 $modal->setHeading($lng->txt("link_link"));
938 $modal->setId("ilIntLinkModal");
939 $modal->setBody("<div id='ilIntLinkModalContent'></div>");
940
941 return $modal->getHTML();
942 }
static init(ilGlobalTemplateInterface $a_main_tpl=null)
loadLanguageModule(string $a_module)
Load language module.
static getInstance()
static initConnection(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.

References $DIC, $lng, $tpl, ilModalGUI\getInstance(), ilExplorerBaseGUI\init(), and ilYuiUtil\initConnection().

Referenced by ilLinkInputGUI\getContentOutsideFormTag(), ilPCTableGUI\getEditDataTable(), ilObjLinkResourceGUI\manage(), and ilPageObjectGUI\showPage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOnloadCode()

static ilInternalLinkGUI::getOnloadCode ( string  $a_url)
static

Definition at line 907 of file class.ilInternalLinkGUI.php.

907 : string
908 {
909 return "il.Util.addOnLoad(function() {il.IntLink.init({url: '$a_url'});});";
910 }

Referenced by ilLinkInputGUI\getOnloadCode().

+ Here is the caller graph for this function:

◆ getSetLinkTargetScript()

ilInternalLinkGUI::getSetLinkTargetScript ( )

Definition at line 194 of file class.ilInternalLinkGUI.php.

194 : string
195 {
197 }

References $set_link_script.

◆ getTargetExplorer()

ilInternalLinkGUI::getTargetExplorer ( )

Cange target object.

Definition at line 803 of file class.ilInternalLinkGUI.php.

803 : string
804 {
805 //$ilCtrl->setParameter($this, "target_type", $a_type);
806 $exp = new ilLinkTargetObjectExplorerGUI($this, "getTargetExplorer", $this->link_type);
807
808 $a_type = $this->parent_type[$this->base_link_type] ?? "";
809
810 $white = array("root", "cat", "crs", "fold", "grp");
811
812 $white[] = $a_type;
813 $exp->setClickableType($a_type);
814 if ($a_type === "prtf") {
815 $white[] = "prtt";
816 $exp->setClickableType("prtt");
817 }
818
819 $exp->setTypeWhiteList($white);
820
821
822 if (!$exp->handleCommand()) {
823 return $exp->getHTML();
824 }
825 return "";
826 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ getUserSearchResult()

ilInternalLinkGUI::getUserSearchResult ( )

Search user.

Definition at line 1065 of file class.ilInternalLinkGUI.php.

1065 : string
1066 {
1067 global $DIC;
1068
1069 $lng = $DIC->language();
1070
1071 if (strlen($this->request->getUserSearchStr()) < 3) {
1072 if (strlen($this->request->getUserSearchStr()) > 0) {
1073 $lng->loadLanguageModule("search");
1074 return ilUtil::getSystemMessageHTML($lng->txt("search_minimum_three"), "info");
1075 }
1076
1077 return "";
1078 }
1079
1080 $form = $this->initUserSearchForm();
1081 $form->checkInput();
1082
1083 $users = ilInternalLink::searchUsers($form->getInput("usr_search_str"));
1084 if (count($users) === 0) {
1085 return ilUtil::getSystemMessageHTML($lng->txt("cont_user_search_did_not_match"), "info");
1086 }
1087
1088 $f = $DIC->ui()->factory();
1089 $r = $DIC->ui()->renderer();
1090 $lng = $DIC->language();
1091 $cards = array();
1092 foreach ($users as $user) {
1093 $b = $f->button()->standard($lng->txt("insert"), "#")
1094 ->withOnLoadCode(function ($id) use ($user) {
1095 return
1096 '$("#' . $id . "\").click(function(ev) { il.IntLink.addInternalLink('[iln user=\"" .
1097 ilObjUser::_lookupLogin($user) . "\"/]', '', ev); return false;});";
1098 });
1100 $cards[] = $f->card()->standard($name, $f->image()->responsive(ilObjUser::_getPersonalPicturePath($user, "small"), $name))
1101 ->withSections(array($b));
1102 }
1103 $deck = $f->deck($cards)->withLargeCardsSize();
1104
1105 return $r->renderAsync($deck);
1106 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static _getPersonalPicturePath(int $a_usr_id, string $a_size="small", bool $a_force_pic=false, bool $a_prevent_no_photo_image=false, bool $html_export=false)
static _lookupLogin(int $a_user_id)
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="ilpublicuserprofilegui")
Default behaviour is:
static getSystemMessageHTML(string $a_txt, string $a_type="info")
Get HTML for a system message.
if($format !==null) $name
Definition: metadata.php:247

References Vendor\Package\$b, $DIC, Vendor\Package\$f, $id, $lng, $name, ilObjUser\_getPersonalPicturePath(), ilObjUser\_lookupLogin(), ilUserUtil\getNamePresentation(), ilUtil\getSystemMessageHTML(), and ilInternalLink\searchUsers().

+ Here is the call graph for this function:

◆ init()

ilInternalLinkGUI::init ( )

Definition at line 97 of file class.ilInternalLinkGUI.php.

97 : void
98 {
102
103 if ($this->parent_ref_id > 0 && !$tree->isInTree($this->parent_ref_id)) {
104 $this->resetLinkList();
105 }
106
107 $this->parent_type = array(
108 "StructureObject" => "lm",
109 "PageObject" => "lm",
110 "GlossaryItem" => "glo",
111 "Media" => "mep",
112 "WikiPage" => "wiki",
113 "PortfolioPage" => "prtf",
114 "PortfolioTemplatePage" => "prtt",
115 "File" => "",
116 "RepositoryItem" => "",
117 "User" => ""
118 );
119
120 // filter link types
121 $this->ltypes = array(
122 "StructureObject" => $lng->txt("cont_lk_chapter"),
123 "StructureObject_New" => $lng->txt("cont_lk_chapter_new"),
124 "PageObject" => $lng->txt("cont_lk_page"),
125 "PageObject_FAQ" => $lng->txt("cont_lk_page_faq"),
126 "PageObject_New" => $lng->txt("cont_lk_page_new"),
127 "GlossaryItem" => $lng->txt("cont_lk_term"),
128 "GlossaryItem_New" => $lng->txt("cont_lk_term_new"),
129 "Media" => $lng->txt("cont_lk_media_inline"),
130 "Media_Media" => $lng->txt("cont_lk_media_media"),
131 "Media_FAQ" => $lng->txt("cont_lk_media_faq"),
132 "Media_New" => $lng->txt("cont_lk_media_new"),
133 "WikiPage" => $lng->txt("cont_wiki_page"),
134 "PortfolioPage" => $lng->txt("cont_prtf_page"),
135 "PortfolioTemplatePage" => $lng->txt("cont_prtt_page"),
136 "File" => $lng->txt("cont_lk_file"),
137 "RepositoryItem" => $lng->txt("cont_repository_item"),
138 "User" => $lng->txt("cont_user")
139 );
140 if (!$this->filter_white_list) {
141 foreach ($this->filter_link_types as $link_type) {
142 unset($this->ltypes[$link_type]);
143 }
144 } else {
145 $ltypes = array();
146 foreach ($this->ltypes as $k => $l) {
147 if (in_array($k, $this->filter_link_types, true)) {
148 $ltypes[$k] = $l;
149 }
150 }
151 $this->ltypes = $ltypes;
152 }
153 // determine link type and target
154 $this->link_type = ($this->request->getLinkType() === "")
155 ? $this->default_link_type
156 : $this->request->getLinkType();
157 $ltype_arr = explode("_", $this->link_type);
158 $this->base_link_type = $ltype_arr[0];
159 $this->link_target = $ltype_arr[1] ?? "";
160
161
162 $def_type = ilObject::_lookupType($this->default_parent_obj_id);
163
164 // determine content object id
165 switch ($this->base_link_type) {
166 case "PageObject":
167 case "StructureObject":
168 case "GlossaryItem":
169 case "Media":
170 case "WikiPage":
171 case "PortfolioPage":
172 case "PortfolioTemplatePage":
173 if ($this->parent_ref_id === 0 && $this->parent_obj_id === 0
174 && $def_type === ($this->parent_type[$this->base_link_type] ?? "")) {
175 $this->parent_ref_id = $this->default_parent_ref_id;
176 $this->parent_obj_id = $this->default_parent_obj_id;
177 $ctrl->setParameter($this, "link_par_obj_id", $this->parent_obj_id);
178 $ctrl->setParameter($this, "link_par_ref_id", $this->parent_ref_id);
179 }
180 break;
181 }
182 }
isInTree(?int $a_node_id)
get all information of a node.

References $ctrl, $default_parent_obj_id, $default_parent_ref_id, $link_type, $lng, $ltypes, $tree, ilObject\_lookupType(), ilTree\isInTree(), resetLinkList(), ilCtrl\setParameter(), and ilLanguage\txt().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initUserSearchForm()

ilInternalLinkGUI::initUserSearchForm ( )

Init user search form.

Definition at line 1047 of file class.ilInternalLinkGUI.php.

1048 {
1049 $form = new ilPropertyFormGUI();
1050 $form->setId("link_user_search_form");
1051
1052 // user search
1053 $ti = new ilTextInputGUI($this->lng->txt("obj_user"), "usr_search_str");
1054 $ti->setValue($this->request->getUserSearchStr());
1055 $form->addItem($ti);
1056
1057 $form->addCommandButton("searchUser", $this->lng->txt("search"));
1058
1059 return $form;
1060 }
This class represents a property form user interface.
This class represents a text property in a property form.

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ outputThumbnail()

ilInternalLinkGUI::outputThumbnail ( ilGlobalTemplate  $tpl,
int  $a_id,
string  $a_mode = "" 
)

output thumbnail

Definition at line 742 of file class.ilInternalLinkGUI.php.

746 : void {
747 // output thumbnail
748 $mob = new ilObjMediaObject($a_id);
749 $med = $mob->getMediaItem("Standard");
750 $target = $med->getThumbnailTarget("small");
751 $suff = "";
752 if ($this->getSetLinkTargetScript() !== "") {
753 $tpl->setCurrentBlock("thumbnail_link");
754 $suff = "_link";
755 } else {
756 $tpl->setCurrentBlock("thumbnail_js");
757 $suff = "_js";
758 }
759
760 if ($target !== "") {
761 $tpl->setCurrentBlock("thumb" . $suff);
762 $tpl->setVariable("SRC_THUMB", $target);
763 $tpl->parseCurrentBlock();
764 } else {
765 $tpl->setVariable("NO_THUMB", "&nbsp;");
766 }
767
768 if ($this->getSetLinkTargetScript() !== "") {
769 $tpl->setCurrentBlock("thumbnail_link");
770 } else {
771 $tpl->setCurrentBlock("thumbnail_js");
772 }
773 $tpl->parseCurrentBlock();
774 }
setCurrentBlock(string $part=self::DEFAULT_BLOCK)

References ilGlobalTemplate\setCurrentBlock().

+ Here is the call graph for this function:

◆ prepareJavascriptOutput()

ilInternalLinkGUI::prepareJavascriptOutput ( string  $str)

Prepare output for JS enabled editing.

Definition at line 252 of file class.ilInternalLinkGUI.php.

252 : string
253 {
254 return htmlspecialchars($str, ENT_QUOTES);
255 }

◆ refreshRepositorySelector()

ilInternalLinkGUI::refreshRepositorySelector ( )

Refresh Repository Selector.

Definition at line 900 of file class.ilInternalLinkGUI.php.

900 : void
901 {
902 $output = $this->selectRepositoryItem();
903 echo $output;
904 exit;
905 }
selectRepositoryItem()
select repository item explorer

References exit.

◆ renderLink()

ilInternalLinkGUI::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.

Definition at line 947 of file class.ilInternalLinkGUI.php.

956 : void {
957 $chapterRowBlock = "chapter_row_js";
958 $anchor_row_block = "anchor_link_js";
959
960 $target_str = ($this->link_target === "")
961 ? ""
962 : " target=\"" . $this->link_target . "\"";
963
964 if (count($a_anchors) > 0) {
965 foreach ($a_anchors as $anchor) {
966 if ($this->getSetLinkTargetScript() !== "") {
967 // not implemented yet (anchors that work with map areas)
968
969 /*$tpl->setCurrentBlock("anchor_link");
970 $tpl->setVariable("ALINK",
971 ilUtil::appendUrlParameterString($this->getSetLinkTargetScript(),
972 "linktype=".$a_type.
973 "&linktarget=il__".$a_type_short."_".$a_obj_id.
974 "&linktargetframe=".$this->link_target).
975 "&linkanchor=".$anchor);
976 $tpl->setVariable("TXT_ALINK", "#" . $anchor);
977 $tpl->parseCurrentBlock();*/
978 } else {
979 $tpl->setCurrentBlock($anchor_row_block);
980 $tpl->setVariable(
981 "ALINK_BEGIN",
982 $this->prepareJavascriptOutput("[iln " . $a_bb_type . "=\"" . $a_obj_id . "\"" . $target_str . " anchor=\"$anchor\"]")
983 );
984 $tpl->setVariable("ALINK_END", "[/iln]");
985 $tpl->setVariable("TXT_LINK", "#" . $anchor);
986 $tpl->parseCurrentBlock();
987 }
988 }
989 }
990
991 if ($this->getSetLinkTargetScript() !== "") {
993 if ($a_type === "MediaObject") {
994 $this->outputThumbnail($tpl, $a_obj_id);
995 }
996 $tpl->setCurrentBlock("link_row");
997 $tpl->setVariable("TXT_CHAPTER", $a_title);
998 $tpl->setVariable(
999 "LINK",
1001 $this->getSetLinkTargetScript(),
1002 "linktype=" . $a_type .
1003 "&linktarget=il__" . $a_type_short . "_" . $a_obj_id .
1004 "&linktargetframe=" . $this->link_target
1005 )
1006 );
1007 } else {
1008 $tpl->setCurrentBlock($chapterRowBlock);
1009 if ($a_type === "MediaObject") {
1010 $this->outputThumbnail($tpl, $a_obj_id);
1011 $tpl->setCurrentBlock($chapterRowBlock);
1012 }
1013 $tpl->setVariable("TXT_CHAPTER", $a_title);
1014 if ($a_type === "MediaObject" && empty($target_str)) {
1015 $tpl->setVariable(
1016 "LINK_BEGIN",
1017 $this->prepareJavascriptOutput("[iln " . $a_bb_type . "=\"" . $a_obj_id . "\"/]")
1018 );
1019 $tpl->setVariable("LINK_END", "");
1020 } else {
1021 $tpl->setVariable(
1022 "LINK_BEGIN",
1023 $this->prepareJavascriptOutput("[iln " . $a_bb_type . "=\"" . $a_obj_id . "\"" . $target_str . "]")
1024 );
1025 $tpl->setVariable("LINK_CONTENT", $a_link_content);
1026 $tpl->setVariable("LINK_END", "[/iln]");
1027 }
1028 }
1029 $tpl->parseCurrentBlock();
1030
1031 $tpl->setCurrentBlock("row");
1032 $tpl->parseCurrentBlock();
1033 }
static _recoverParameters()
Recover parameters from session variables (static)
prepareJavascriptOutput(string $str)
Prepare output for JS enabled editing.
outputThumbnail(ilGlobalTemplate $tpl, int $a_id, string $a_mode="")
output thumbnail
static appendUrlParameterString(string $a_url, string $a_par, bool $xml_style=false)

References $tpl.

Referenced by showLinkHelp().

+ Here is the caller graph for this function:

◆ resetLinkList()

ilInternalLinkGUI::resetLinkList ( )

Definition at line 228 of file class.ilInternalLinkGUI.php.

228 : void
229 {
231
232 $ctrl->setParameter($this, "link_par_ref_id", 0);
233 $ctrl->setParameter($this, "link_par_obj_id", 0);
234 $ctrl->setParameter($this, "link_par_fold_id", 0);
235 $ctrl->setParameter($this, "link_type", "");
236
237 $ctrl->redirect($this, "showLinkHelp", "", true);
238 }

References $ctrl, ilCtrl\redirect(), and ilCtrl\setParameter().

Referenced by init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveFileLink()

ilInternalLinkGUI::saveFileLink ( )

Save file link.

Definition at line 719 of file class.ilInternalLinkGUI.php.

719 : void
720 {
721 if ($_FILES["link_file"]["name"] != "") {
722 $fileObj = new ilObjFile();
723 $fileObj->setType("file");
724 $fileObj->setTitle($_FILES["link_file"]["name"]);
725 $fileObj->setDescription("");
726 $fileObj->setFileName($_FILES["link_file"]["name"]);
727 $fileObj->setMode("filelist");
728 $fileObj->create();
729 // upload file to filesystem
730 $fileObj->getUploadFile(
731 $_FILES["link_file"]["tmp_name"],
732 $_FILES["link_file"]["name"]
733 );
734 $this->uploaded_file = $fileObj;
735 }
736 $this->showLinkHelp();
737 }
showLinkHelp()
Show link help list.
Class ilObjFile.

References showLinkHelp().

+ Here is the call graph for this function:

◆ selectRepositoryItem()

ilInternalLinkGUI::selectRepositoryItem ( )

select repository item explorer

Definition at line 882 of file class.ilInternalLinkGUI.php.

882 : string
883 {
884 $ilCtrl = $this->ctrl;
885
886 $ilCtrl->setParameter($this, "link_par_fold_id", "");
887
888 $exp = new ilIntLinkRepItemExplorerGUI($this, "selectRepositoryItem");
889 $exp->setSetLinkTargetScript($this->getSetLinkTargetScript());
890
891 if (!$exp->handleCommand()) {
892 return $exp->getHTML();
893 }
894 return "";
895 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Referenced by showLinkHelp().

+ Here is the caller graph for this function:

◆ setFilterWhiteList()

ilInternalLinkGUI::setFilterWhiteList ( bool  $a_white_list)

Set filter list as white list (per detault it is a black list)

Definition at line 207 of file class.ilInternalLinkGUI.php.

207 : void
208 {
209 $this->filter_white_list = $a_white_list;
210 }

◆ setMedPoolFolder()

ilInternalLinkGUI::setMedPoolFolder ( )

select media pool folder

Definition at line 793 of file class.ilInternalLinkGUI.php.

793 : void
794 {
796 $ctrl->setParameter($this, "link_par_fold_id", $this->request->getMediaPoolFolder());
797 $ctrl->redirect($this, "showLinkHelp", "", true);
798 }

References ilCtrl\redirect(), and ilCtrl\setParameter().

+ Here is the call graph for this function:

◆ setReturn()

ilInternalLinkGUI::setReturn ( string  $a_return)

Definition at line 189 of file class.ilInternalLinkGUI.php.

189 : void
190 {
191 $this->return = $a_return;
192 }

◆ setSetLinkTargetScript()

ilInternalLinkGUI::setSetLinkTargetScript ( string  $a_script)

Definition at line 184 of file class.ilInternalLinkGUI.php.

184 : void
185 {
186 $this->set_link_script = $a_script;
187 }

◆ showLinkHelp()

ilInternalLinkGUI::showLinkHelp ( )

Show link help list.

Definition at line 261 of file class.ilInternalLinkGUI.php.

261 : void
262 {
264 $ilCtrl = $this->ctrl;
265
266
267 $parent_type = $this->parent_type[$this->base_link_type] ?? "";
268 if ((in_array($this->base_link_type, array("GlossaryItem", "WikiPage", "PageObject", "StructureObject"), true) &&
269 ($this->parent_ref_id === 0))
270 ||
271 (($this->parent_ref_id > 0) &&
272 ilObject::_lookupType($this->parent_ref_id, true) !== $parent_type)) {
273 if ($parent_type !== "") {
275 }
276 }
277 if ($ilCtrl->isAsynch()) {
278 $tpl = new ilGlobalTemplate("tpl.link_help_asynch.html", true, true, "Services/Link");
279 $tpl->setVariable("NEW_LINK_URL", $this->ctrl->getLinkTarget(
280 $this,
281 "",
282 false,
283 true,
284 false
285 ));
286 } else {
287 $tpl = new ilGlobalTemplate("tpl.link_help.html", true, true, "Services/Link");
288 $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
289 }
290
291 $tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "changeLinkType", "", true));
292 $tpl->setVariable("FORMACTION2", $this->ctrl->getFormAction($this));
293 $tpl->setVariable("TXT_HELP_HEADER", $this->lng->txt("cont_link_select"));
294 $tpl->setVariable("TXT_TYPE", $this->lng->txt("cont_link_type"));
295
296
298 $this->link_type,
299 "ltype",
300 $this->ltypes,
301 false,
302 true,
303 "0",
304 "",
305 array("id" => "ilIntLinkTypeSelector")
306 );
307 $tpl->setVariable("SELECT_TYPE", $select_ltype);
308 $tpl->setVariable("CMD_CHANGETYPE", "changeLinkType");
309 $tpl->setVariable("BTN_CHANGETYPE", $this->lng->txt("cont_change_type"));
310
311 $tpl->setVariable("CMD_CLOSE", "closeLinkHelp");
312 $tpl->setVariable("BTN_CLOSE", $this->lng->txt("close"));
313
314 $chapterRowBlock = "chapter_row_js";
315
316 // switch link type
317 switch ($this->base_link_type) {
318 // page link
319 case "PageObject":
320 $cont_obj = new ilObjLearningModule($this->parent_ref_id, true);
321
322 // get all chapters
323 $ctree = $cont_obj->getLMTree();
324 $nodes = $ctree->getSubTree($ctree->getNodeData($ctree->getRootId()));
325 $tpl->setCurrentBlock("chapter_list");
326 $tpl->setVariable("TXT_CONTENT_OBJECT", $this->lng->txt("obj_lm"));
327 $tpl->setVariable("TXT_CONT_TITLE", $cont_obj->getTitle());
328 $tpl->setVariable("THEAD", $this->lng->txt("pages"));
329
330
331 $tpl->setCurrentBlock("change_cont_obj");
332 $tpl->setVariable("CMD_CHANGE_CONT_OBJ", "changeTargetObject");
333 $tpl->setVariable("BTN_CHANGE_CONT_OBJ", $this->lng->txt("change"));
334 $tpl->parseCurrentBlock();
335
336 foreach ($nodes as $node) {
337 if ($node["type"] === "st") {
338 $tpl->setCurrentBlock("header_row");
339 $tpl->setVariable("TXT_HEADER", $node["title"]);
340 $tpl->parseCurrentBlock();
341 $tpl->setCurrentBlock("row");
342 $tpl->parseCurrentBlock();
343 }
344
345 if ($node["type"] === "pg") {
346 $this->renderLink(
347 $tpl,
348 $node["title"],
349 $node["obj_id"],
350 "PageObject",
351 "pg",
352 "page",
353 ilPCParagraph::_readAnchors("lm", $node["obj_id"], "")
354 );
355 }
356 }
357
358 // get all free pages
359 $pages = ilLMPageObject::getPageList($cont_obj->getId());
360 $free_pages = array();
361 foreach ($pages as $page) {
362 if (!$ctree->isInTree($page["obj_id"])) {
363 $free_pages[] = $page;
364 }
365 }
366 if (count($free_pages) > 0) {
367 $tpl->setCurrentBlock("header_row");
368 $tpl->setVariable("TXT_HEADER", $this->lng->txt("cont_free_pages"));
369 $tpl->parseCurrentBlock();
370
371 foreach ($free_pages as $node) {
372 $this->renderLink(
373 $tpl,
374 $node["title"],
375 $node["obj_id"],
376 "PageObject",
377 "pg",
378 "page",
379 ilPCParagraph::_readAnchors("lm", $node["obj_id"], "")
380 );
381 }
382 }
383
384 $tpl->setCurrentBlock("chapter_list");
385 $tpl->parseCurrentBlock();
386
387 break;
388
389 // chapter link
390 case "StructureObject":
391
392 // check whether current object matchs to type
393 if (ilObject::_lookupType($this->parent_ref_id, true) !== "lm") {
394 $this->changeTargetObject("lm");
395 }
396
397 $cont_obj = new ilObjLearningModule($this->parent_ref_id, true);
398
399 // get all chapters
400 $ctree = $cont_obj->getLMTree();
401 $nodes = $ctree->getSubTree($ctree->getNodeData($ctree->getRootId()));
402 $tpl->setCurrentBlock("chapter_list");
403 $tpl->setVariable("TXT_CONTENT_OBJECT", $this->lng->txt("obj_lm"));
404 $tpl->setVariable("TXT_CONT_TITLE", $cont_obj->getTitle());
405 $tpl->setVariable("THEAD", $this->lng->txt("link_chapters"));
406 $tpl->setCurrentBlock("change_cont_obj");
407 $tpl->setVariable("CMD_CHANGE_CONT_OBJ", "changeTargetObject");
408 $tpl->setVariable("BTN_CHANGE_CONT_OBJ", $this->lng->txt("change"));
409 $tpl->parseCurrentBlock();
410
411 foreach ($nodes as $node) {
412 if ($node["type"] === "st") {
413 $this->renderLink(
414 $tpl,
415 $node["title"],
416 $node["obj_id"],
417 "StructureObject",
418 "st",
419 "chap"
420 );
421 }
422 }
423 $tpl->setCurrentBlock("chapter_list");
424 $tpl->parseCurrentBlock();
425 break;
426
427 // glossary item link
428 case "GlossaryItem":
429 $glossary = new ilObjGlossary($this->parent_ref_id, true);
430
431 // get all glossary items
432 $terms = $glossary->getTermList();
433 $tpl->setCurrentBlock("chapter_list");
434 $tpl->setVariable("TXT_CONTENT_OBJECT", $this->lng->txt("glossary"));
435 $tpl->setVariable("TXT_CONT_TITLE", $glossary->getTitle());
436 $tpl->setVariable("THEAD", $this->lng->txt("link_terms"));
437 $tpl->setCurrentBlock("change_cont_obj");
438 $tpl->setVariable("CMD_CHANGE_CONT_OBJ", "changeTargetObject");
439 $tpl->setVariable("BTN_CHANGE_CONT_OBJ", $this->lng->txt("change"));
440 $tpl->parseCurrentBlock();
441
442 foreach ($terms as $term) {
443 $this->renderLink(
444 $tpl,
445 $term["term"],
446 $term["id"],
447 "GlossaryItem",
448 "git",
449 "term"
450 );
451 }
452
453 $tpl->setCurrentBlock("chapter_list");
454 $tpl->parseCurrentBlock();
455 break;
456
457 // media object
458 case "Media":
459 //$tpl->setVariable("TARGET2", " target=\"content\" ");
460 // content object id = 0 --> get clipboard objects
461 if ($this->parent_ref_id === 0) {
462 $tpl->setCurrentBlock("change_cont_obj");
463 $tpl->setVariable("CMD_CHANGE_CONT_OBJ", "changeTargetObject");
464 $tpl->setVariable("BTN_CHANGE_CONT_OBJ", $this->lng->txt("change"));
465 $tpl->parseCurrentBlock();
466 $mobjs = $ilUser->getClipboardObjects("mob");
467 // sort by name
468 $objs = array();
469 foreach ($mobjs as $obj) {
470 $objs[$obj["title"] . ":" . $obj["id"]] = $obj;
471 }
472 ksort($objs);
473 $tpl->setCurrentBlock("chapter_list");
474 $tpl->setVariable("TXT_CONTENT_OBJECT", $this->lng->txt("cont_media_source"));
475 $tpl->setVariable("TXT_CONT_TITLE", $this->lng->txt("cont_personal_clipboard"));
476 $tpl->setVariable("THEAD", $this->lng->txt("link_mobs"));
477 $tpl->setVariable("COLSPAN", "2");
478
479 foreach ($objs as $obj) {
480 $this->renderLink(
481 $tpl,
482 $obj["title"],
483 $obj["id"],
484 "MediaObject",
485 "mob",
486 "media"
487 );
488 }
489 } else {
490 $med_pool = new ilObjMediaPool($this->parent_ref_id, true);
491 // get current folders
492 $fobjs = $med_pool->getChilds($this->parent_fold_id, "fold");
493 $f2objs = array();
494 foreach ($fobjs as $obj) {
495 $f2objs[$obj["title"] . ":" . $obj["child"]] = $obj;
496 }
497 ksort($f2objs);
498 // get current media objects
499 $mobjs = $med_pool->getChilds($this->parent_fold_id, "mob");
500 $m2objs = array();
501 foreach ($mobjs as $obj) {
502 $m2objs[$obj["title"] . ":" . $obj["child"]] = $obj;
503 }
504 ksort($m2objs);
505
506 // merge everything together
507 $objs = array_merge($f2objs, $m2objs);
508
509 $tpl->setCurrentBlock("chapter_list");
510 $tpl->setVariable("TXT_CONTENT_OBJECT", $this->lng->txt("mep"));
511 $tpl->setVariable("TXT_CONT_TITLE", $med_pool->getTitle());
512 $tpl->setVariable("THEAD", $this->lng->txt("link_mobs"));
513 $tpl->setCurrentBlock("change_cont_obj");
514 $tpl->setVariable("CMD_CHANGE_CONT_OBJ", "changeTargetObject");
515 $tpl->setVariable("BTN_CHANGE_CONT_OBJ", $this->lng->txt("change"));
516 $tpl->setVariable("COLSPAN", "2");
517 $tpl->parseCurrentBlock();
518 if ($parent_id = $med_pool->getParentId($this->parent_fold_id)) {
519 $tpl->setCurrentBlock("icon");
520 $tpl->setVariable("ICON_SRC", ilUtil::getImagePath("icon_fold.svg"));
521 $tpl->parseCurrentBlock();
522 $tpl->setCurrentBlock("link_row");
523 $tpl->setVariable("TXT_CHAPTER", "..");
524 $this->ctrl->setParameter($this, "mep_fold", $parent_id);
525 if ($ilCtrl->isAsynch()) {
526 $tpl->setVariable("LINK", "#");
527 $tpl->setVariable(
528 "LR_ONCLICK",
529 " onclick=\"return il.IntLink.setMepPoolFolder('" . $parent_id . "');\" "
530 );
531 } else {
532 $tpl->setVariable(
533 "LINK",
534 $this->ctrl->getLinkTarget($this, "setMedPoolFolder")
535 );
536 }
537 $tpl->parseCurrentBlock();
538 $tpl->setCurrentBlock("row");
539 $tpl->parseCurrentBlock();
540 }
541 foreach ($objs as $obj) {
542 if ($obj["type"] === "fold") {
543 $tpl->setCurrentBlock("icon");
544 $tpl->setVariable("ICON_SRC", ilUtil::getImagePath("icon_fold.svg"));
545 $tpl->parseCurrentBlock();
546 $tpl->setCurrentBlock("link_row");
547 $tpl->setVariable("TXT_CHAPTER", $obj["title"]);
548 $this->ctrl->setParameter($this, "mep_fold", $obj["child"]);
549 if ($ilCtrl->isAsynch()) {
550 $tpl->setVariable("LINK", "#");
551 $tpl->setVariable(
552 "LR_ONCLICK",
553 " onclick=\"return il.IntLink.setMepPoolFolder('" . $obj["child"] . "');\" "
554 );
555 } else {
556 $tpl->setVariable(
557 "LINK",
558 $this->ctrl->getLinkTarget($this, "setMedPoolFolder")
559 );
560 }
561 $tpl->parseCurrentBlock();
562 } else {
563 $fid = ilMediaPoolItem::lookupForeignId($obj["child"]);
564 if (ilObject::_lookupType($fid) === "mob") {
565 $this->renderLink(
566 $tpl,
567 $obj["title"],
568 $fid,
569 "MediaObject",
570 "mob",
571 "media"
572 );
573 }
574 }
575 $tpl->setCurrentBlock("row");
576 $tpl->parseCurrentBlock();
577 }
578 }
579 $tpl->setCurrentBlock("chapter_list");
580 $tpl->parseCurrentBlock();
581 break;
582
583 // wiki page link
584 case "WikiPage":
585 $wiki_id = ilObject::_lookupObjId($this->parent_ref_id);
586 $wpages = ilWikiPage::getAllWikiPages($wiki_id);
587
588 // get all glossary items
589 $tpl->setCurrentBlock("chapter_list");
590 $tpl->setVariable("TXT_CONTENT_OBJECT", $this->lng->txt("obj_wiki"));
591 $tpl->setVariable("TXT_CONT_TITLE", ilObject::_lookupTitle($wiki_id));
592 $tpl->setVariable("THEAD", $this->lng->txt("link_wpages"));
593 $tpl->setCurrentBlock("change_cont_obj");
594 $tpl->setVariable("CMD_CHANGE_CONT_OBJ", "changeTargetObject");
595 $tpl->setVariable("BTN_CHANGE_CONT_OBJ", $this->lng->txt("change"));
596 $tpl->parseCurrentBlock();
597
598 foreach ($wpages as $wpage) {
599 $this->renderLink(
600 $tpl,
601 $wpage["title"],
602 $wpage["id"],
603 "WikiPage",
604 "wpage",
605 "wpage",
606 ilPCParagraph::_readAnchors("wpg", $wpage["id"], "")
607 );
608 }
609 $tpl->setCurrentBlock("chapter_list");
610 $tpl->parseCurrentBlock();
611 break;
612
613 // Portfolio page link
614 case "PortfolioPage":
615 case "PortfolioTemplatePage":
616 $prtf_id = $this->parent_obj_id;
617 $ppages = ilPortfolioPage::getAllPortfolioPages($prtf_id);
618
619 // get all glossary items
620 $tpl->setCurrentBlock("chapter_list");
621 $tpl->setVariable("TXT_CONTENT_OBJECT", $this->lng->txt("obj_" . ilObject::_lookupType($prtf_id)));
622 $tpl->setVariable("TXT_CONT_TITLE", ilObject::_lookupTitle($prtf_id));
623 $tpl->setVariable("THEAD", $this->lng->txt("pages"));
624
625 foreach ($ppages as $ppage) {
626 $this->renderLink(
627 $tpl,
628 $ppage["title"],
629 $ppage["id"],
630 "PortfolioPage",
631 "ppage",
632 "ppage",
633 array(),
634 $ppage["title"]
635 );
636 }
637
638 $tpl->setCurrentBlock("chapter_list");
639 $tpl->parseCurrentBlock();
640 break;
641
642 // repository item
643 case "RepositoryItem":
644 $tpl->setVariable("LINK_HELP_CONTENT", $this->selectRepositoryItem());
645 break;
646
647 // file download link
648 case "File":
649 if (!isset($this->uploaded_file)) {
650 $tpl->setVariable("LINK_HELP_CONTENT", $this->getFileLinkHTML());
651 } else {
652 echo $this->getFileLinkHTML();
653 exit;
654 }
655 break;
656
657 // file download link
658 case "User":
659 $tpl->setVariable("LINK_HELP_CONTENT", $this->addUser());
660 break;
661
662 }
663
664 if ($ilCtrl->isAsynch()) {
665 echo $tpl->get();
666 exit;
667 }
668
669 exit;
670 }
special template class to simplify handling of ITX/PEAR
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.
getFileLinkHTML()
Get HTML for file link.
changeTargetObject(string $a_type="")
Cange target object.
static getPageList(int $lm_id)
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
static lookupForeignId(int $a_id)
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 _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.
static getStyleSheetLocation(string $mode="output", string $a_css_name="", string $a_css_location="")
get full style sheet file name (path inclusive) of current user
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static getAllWikiPages(int $a_wiki_id)
$ilUser
Definition: imgupload.php:34

References $base_link_type, $ctrl, $ilUser, $parent_obj_id, $parent_type, $tpl, $user, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ilPCParagraph\_readAnchors(), addUser(), changeTargetObject(), ILIAS\Repository\ctrl(), exit, ilLegacyFormElementsUtil\formSelect(), ilPortfolioPage\getAllPortfolioPages(), ilWikiPage\getAllWikiPages(), getFileLinkHTML(), ilUtil\getImagePath(), ilLMPageObject\getPageList(), ilUtil\getStyleSheetLocation(), ILIAS\Repository\lng(), ilMediaPoolItem\lookupForeignId(), renderLink(), and selectRepositoryItem().

Referenced by saveFileLink().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $base_link_type

string ilInternalLinkGUI::$base_link_type = ""
protected

Definition at line 39 of file class.ilInternalLinkGUI.php.

Referenced by showLinkHelp().

◆ $ctrl

ilCtrl ilInternalLinkGUI::$ctrl

Definition at line 45 of file class.ilInternalLinkGUI.php.

Referenced by getFileLinkHTML(), init(), resetLinkList(), and showLinkHelp().

◆ $default_link_type

string ilInternalLinkGUI::$default_link_type = ""
protected

Definition at line 32 of file class.ilInternalLinkGUI.php.

◆ $default_parent_obj_id

int ilInternalLinkGUI::$default_parent_obj_id = 0
protected

Definition at line 34 of file class.ilInternalLinkGUI.php.

Referenced by init().

◆ $default_parent_obj_type

string ilInternalLinkGUI::$default_parent_obj_type
protected

Definition at line 29 of file class.ilInternalLinkGUI.php.

◆ $default_parent_ref_id

int ilInternalLinkGUI::$default_parent_ref_id = 0
protected

Definition at line 33 of file class.ilInternalLinkGUI.php.

Referenced by init().

◆ $filter_link_types

array ilInternalLinkGUI::$filter_link_types = []
protected

Definition at line 48 of file class.ilInternalLinkGUI.php.

◆ $filter_white_list

bool ilInternalLinkGUI::$filter_white_list = false
protected

Definition at line 46 of file class.ilInternalLinkGUI.php.

◆ $link_target

string ilInternalLinkGUI::$link_target = ""
protected

Definition at line 38 of file class.ilInternalLinkGUI.php.

◆ $link_type

string ilInternalLinkGUI::$link_type = ""
protected

Definition at line 37 of file class.ilInternalLinkGUI.php.

Referenced by init().

◆ $lng

ilLanguage ilInternalLinkGUI::$lng
protected

Definition at line 50 of file class.ilInternalLinkGUI.php.

Referenced by getFileLinkHTML(), and init().

◆ $ltypes

array ilInternalLinkGUI::$ltypes = []
protected

Definition at line 42 of file class.ilInternalLinkGUI.php.

Referenced by init().

◆ $parent_fold_id

int ilInternalLinkGUI::$parent_fold_id
protected

Definition at line 28 of file class.ilInternalLinkGUI.php.

◆ $parent_obj_id

int ilInternalLinkGUI::$parent_obj_id = 0
protected

Definition at line 36 of file class.ilInternalLinkGUI.php.

Referenced by showLinkHelp().

◆ $parent_ref_id

int ilInternalLinkGUI::$parent_ref_id = 0
protected

Definition at line 35 of file class.ilInternalLinkGUI.php.

◆ $parent_type

array ilInternalLinkGUI::$parent_type = []
protected

Definition at line 44 of file class.ilInternalLinkGUI.php.

Referenced by showLinkHelp().

◆ $request

StandardGUIRequest ilInternalLinkGUI::$request
protected

Definition at line 30 of file class.ilInternalLinkGUI.php.

◆ $return

string ilInternalLinkGUI::$return
protected

Definition at line 31 of file class.ilInternalLinkGUI.php.

◆ $set_link_script

string ilInternalLinkGUI::$set_link_script = ""

Definition at line 40 of file class.ilInternalLinkGUI.php.

Referenced by getSetLinkTargetScript().

◆ $tree

ilTree ilInternalLinkGUI::$tree
protected

Definition at line 49 of file class.ilInternalLinkGUI.php.

Referenced by init().

◆ $uploaded_file

ilObjFile ilInternalLinkGUI::$uploaded_file = null
protected

Definition at line 27 of file class.ilInternalLinkGUI.php.

◆ $user

ilObjUser ilInternalLinkGUI::$user
protected

Definition at line 51 of file class.ilInternalLinkGUI.php.

Referenced by showLinkHelp().


The documentation for this class was generated from the following file: