ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilInternalLinkGUI Class Reference
+ 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...
 
static getModalTemplate ()
 

Data Fields

string $set_link_script = ""
 
ilCtrl $ctrl
 

Protected Attributes

ILIAS MediaObjects Thumbs ThumbsGUI $thumbs_gui
 
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

Definition at line 21 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 50 of file class.ilInternalLinkGUI.php.

54 {
55 global $DIC;
56 if ($a_default_link_type === "PortfolioPage") {
57 $a_is_ref = false;
58 }
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 $this->thumbs_gui = $DIC->mediaObjects()->internal()->gui()->thumbs();
69
70 $this->lng->loadLanguageModule("link");
71 $this->lng->loadLanguageModule("content");
72 $this->lng->loadLanguageModule("copg");
73 $this->ctrl->saveParameter($this, array("linkmode", "link_par_ref_id", "link_par_obj_id",
74 "link_par_fold_id", "link_type"));
75
76 // default type and parent
77 $this->default_link_type = $a_default_link_type;
78 if ($a_is_ref) {
79 $this->default_parent_ref_id = $a_default_parent_id;
80 $this->default_parent_obj_id = ilObject::_lookupObjId($a_default_parent_id);
81 } else {
82 $this->default_parent_ref_id = 0;
83 $this->default_parent_obj_id = $a_default_parent_id;
84 }
85 $this->default_parent_obj_type = ($this->default_parent_obj_id > 0)
86 ? ilObject::_lookupType($this->default_parent_obj_id)
87 : "";
88
89 // current parent object
90 $this->parent_ref_id = $this->request->getLinkParentRefId();
91 $this->parent_fold_id = $this->request->getLinkParentFolderId(); // e.g. media pool folder
92 if ($this->parent_ref_id > 0) {
93 $this->parent_obj_id = ilObject::_lookupObjId($this->parent_ref_id);
94 } else {
95 $this->parent_obj_id = $this->request->getLinkParentObjId();
96 }
97 }
static _lookupType(int $id, bool $reference=false)
static _lookupObjId(int $ref_id)
global $DIC
Definition: shib_login.php:26

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 1056 of file class.ilInternalLinkGUI.php.

1056 : string
1057 {
1058 $form = $this->initUserSearchForm();
1059 return $form->getHTML() . $this->getUserSearchResult();
1060 }
initUserSearchForm()
Init user search form.

Referenced by showLinkHelp().

+ Here is the caller graph for this function:

◆ changeLinkType()

ilInternalLinkGUI::changeLinkType ( )

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

772 : void
773 {
775
776 $ctrl->setParameter($this, "link_type", $this->request->getLinkType());
777 $base_type = explode("_", $this->request->getLinkType())[0];
778 if ($this->parent_type[$base_type] !== ilObject::_lookupType($this->parent_ref_id, true)) {
779 $ctrl->setParameter($this, "link_par_ref_id", 0);
780 $ctrl->setParameter($this, "link_par_obj_id", 0);
781 }
782
783 $ctrl->redirect($this, "showLinkHelp", "", true);
784 }
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

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 827 of file class.ilInternalLinkGUI.php.

829 : void {
830 $ilCtrl = $this->ctrl;
831
832 $ilCtrl->setParameter($this, "link_par_fold_id", "");
833 if ($this->request->getDo() === "set") {
834 $ilCtrl->setParameter($this, "link_par_ref_id", $this->request->getSelectedId());
835 $ilCtrl->redirect($this, "showLinkHelp", "", true);
836 return;
837 }
838
839 $ilCtrl->setParameter($this, "link_type", $this->link_type);
840
841 $tpl = new ilTemplate("tpl.link_help_explorer.html", true, true, "components/ILIAS/COPage/IntLink");
842
843 $output = $this->getTargetExplorer();
844
845 $tpl->setVariable("TXT_EXPLORER_HEADER", $this->lng->txt("cont_choose_" . ($this->parent_type[$this->base_link_type] ?? "")));
846
847 $tpl->setVariable("EXPLORER", $output);
848 $tpl->setVariable("ACTION", $this->ctrl->getFormAction($this, "resetLinkList", "", true));
849 $tpl->setVariable("BTN_RESET", "resetLinkList");
850 $tpl->setVariable("TXT_RESET", $this->lng->txt("back"));
851
852 if (($this->parent_type[$this->base_link_type] ?? "") === "mep") {
853 $tpl->setCurrentBlock("sel_clipboard");
854 $this->ctrl->setParameter($this, "do", "set");
855 if ($ilCtrl->isAsynch()) {
856 $tpl->setVariable("LINK_CLIPBOARD", "#");
858 "CLIPBOARD_ONCLICK",
859 " onclick=\"return il.IntLink.selectLinkTargetObject('mep', 0, '" . $this->link_type . "');\" "
860 );
861 } else {
862 $tpl->setVariable("LINK_CLIPBOARD", $this->ctrl->getLinkTarget($this, "changeTargetObject"));
863 }
864 $tpl->setVariable("TXT_PERS_CLIPBOARD", $this->lng->txt("clipboard"));
866 }
867
869
870 echo $tpl->get();
871 exit;
872 }
getTargetExplorer()
Cange target object.
special template class to simplify handling of ITX/PEAR
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
readonly ilGlobalTemplateInterface $tpl
exit
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:

◆ closeLinkHelp()

ilInternalLinkGUI::closeLinkHelp ( )

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

242 : void
243 {
244 if ($this->return === "") {
245 $this->ctrl->returnToParent($this);
246 } else {
247 ilUtil::redirect($this->return);
248 }
249 }
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 215 of file class.ilInternalLinkGUI.php.

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

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

+ Here is the call graph for this function:

◆ filterLinkType()

ilInternalLinkGUI::filterLinkType ( string  $a_link_type)

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

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

◆ getFileLinkHTML()

ilInternalLinkGUI::getFileLinkHTML ( )

Get HTML for file link.

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

676 : string
677 {
679 $ilCtrl = $this->ctrl;
680
681 $tpl = new ilTemplate("tpl.link_file.html", true, true, "components/ILIAS/COPage/IntLink");
682 if (!is_object($this->uploaded_file)) {
683 $tpl->setCurrentBlock("form");
685 "FORM_ACTION",
686 $ilCtrl->getFormAction($this, "saveFileLink", "", true)
687 );
688 $tpl->setVariable("TXT_SELECT_FILE", $lng->txt("cont_select_file"));
689 $tpl->setVariable("TXT_SAVE_LINK", $lng->txt("cont_create_link"));
690 $tpl->setVariable("CMD_SAVE_LINK", "saveFileLink");
691 $fi = new ilFileInputGUI("", "link_file");
692 $fi->setSize(15);
693 $tpl->setVariable("INPUT", $fi->getToolbarHTML());
695 } else {
696 $tpl->setCurrentBlock("link_js");
697 // $tpl->setVariable("LINK_FILE",
698 // $this->prepareJavascriptOutput("[iln dfile=\"".$this->uploaded_file->getId()."\"] [/iln]")
699 // );
701 "TAG_B",
702 '[iln dfile=\x22' . $this->uploaded_file->getId() . '\x22]'
703 );
705 "TAG_E",
706 "[/iln]"
707 );
709 "TXT_FILE",
710 $this->uploaded_file->getTitle()
711 );
712 // $tpl->parseCurrentBlock();
713 }
714 return $tpl->get();
715 }
This class represents a file property in a property form.
txt(string|LanguageIdentifier $a_topic, ?int $n=null)
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, ILIAS\News\Common\Table\$tpl, ILIAS\UICore\GlobalTemplate\get(), ILIAS\UICore\GlobalTemplate\parseCurrentBlock(), ILIAS\UICore\GlobalTemplate\setCurrentBlock(), ILIAS\UICore\GlobalTemplate\setVariable(), 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 911 of file class.ilInternalLinkGUI.php.

911 : string
912 {
913 global $DIC;
914
915 $lng = $DIC->language();
916 $tpl = $DIC["tpl"];
917
919 self::getOnloadCode($a_url)
920 );
921
922 $lng->loadLanguageModule("link");
923
924 $debug = false;
925
926 $tpl->addJavaScript("assets/js/ilExplorer.js");
928
929 if ($debug) {
930 $tpl->addJavascript("../components/ILIAS/COPage/IntLink/resources/ilIntLink.js");
931 } else {
932 $tpl->addJavascript("assets/js/ilIntLink.js");
933 }
934
935 // #18721
936 $tpl->addJavaScript("assets/js/Form.js");
937
939 $tpl->addOnLoadCode('il.IntLink.setModalTemplate("' . addslashes(json_encode($mt["template"])) . '", "' . $mt["show"] . '", "' . $mt["close"] . '");');
940
941 $html = "<div id='ilIntLinkModal' data-show-signal='" . $mt["show"] . "' data-close-signal='" . $mt["close"] . "'></div>";
942
943 return $html;
944 }
static init(?ilGlobalTemplateInterface $a_main_tpl=null)
loadLanguageModule(string $a_module)
Load language module.
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.

References $DIC, $lng, ILIAS\News\Common\Table\$tpl, ILIAS\UICore\GlobalTemplate\addJavaScript(), ILIAS\UICore\GlobalTemplate\addOnLoadCode(), and ilExplorerBaseGUI\init().

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

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

◆ getModalTemplate()

static ilInternalLinkGUI::getModalTemplate ( )
static

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

946 : array
947 {
948 global $DIC;
949
950 $lng = $DIC->language();
951
952 $ui = $DIC->ui();
953 $modal = $ui->factory()->modal()->roundtrip($lng->txt("link_link"), $ui->factory()->legacy()->content("<div id='ilIntLinkModalContent'></div>"));
954 $modalt["show"] = $modal->getShowSignal()->getId();
955 $modalt["close"] = $modal->getCloseSignal()->getId();
956 $modalt["template"] = $ui->renderer()->renderAsync($modal);
957
958 return $modalt;
959 }

References $DIC, and $lng.

◆ getOnloadCode()

static ilInternalLinkGUI::getOnloadCode ( string  $a_url)
static

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

903 : string
904 {
905 return "il.Util.addOnLoad(function() {il.IntLink.init({url: '$a_url'});});";
906 }

Referenced by ilLinkInputGUI\getOnloadCode().

+ Here is the caller graph for this function:

◆ getSetLinkTargetScript()

ilInternalLinkGUI::getSetLinkTargetScript ( )

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

196 : string
197 {
199 }

References $set_link_script.

◆ getTargetExplorer()

ilInternalLinkGUI::getTargetExplorer ( )

Cange target object.

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

799 : string
800 {
801 //$ilCtrl->setParameter($this, "target_type", $a_type);
802 $exp = new ilLinkTargetObjectExplorerGUI($this, "getTargetExplorer", $this->link_type);
803
804 $a_type = $this->parent_type[$this->base_link_type] ?? "";
805
806 $white = array("root", "cat", "crs", "fold", "grp");
807
808 $white[] = $a_type;
809 $exp->setClickableType($a_type);
810 if ($a_type === "prtf") {
811 $white[] = "prtt";
812 $exp->setClickableType("prtt");
813 }
814
815 $exp->setTypeWhiteList($white);
816
817
818 if (!$exp->handleCommand()) {
819 return $exp->getHTML();
820 }
821 return "";
822 }
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 1083 of file class.ilInternalLinkGUI.php.

1083 : string
1084 {
1085 global $DIC;
1086
1087 $lng = $DIC->language();
1088
1089 if (strlen($this->request->getUserSearchStr()) < 3) {
1090 if (strlen($this->request->getUserSearchStr()) > 0) {
1091 $lng->loadLanguageModule("search");
1092 return ilUtil::getSystemMessageHTML($lng->txt("search_minimum_three"), "info");
1093 }
1094
1095 return "";
1096 }
1097
1098 $form = $this->initUserSearchForm();
1099 $form->checkInput();
1100
1101 $users = ilInternalLink::searchUsers($form->getInput("usr_search_str"));
1102 if (count($users) === 0) {
1103 return ilUtil::getSystemMessageHTML($lng->txt("cont_user_search_did_not_match"), "info");
1104 }
1105
1106 $f = $DIC->ui()->factory();
1107 $r = $DIC->ui()->renderer();
1108 $lng = $DIC->language();
1109 $cards = array();
1110 foreach ($users as $user) {
1111 $b = $f->button()->standard($lng->txt("insert"), "#")
1112 ->withOnLoadCode(function ($id) use ($user) {
1113 return
1114 '$("#' . $id . "\").click(function(ev) { il.IntLink.addInternalLink('[iln user=\"" .
1115 ilObjUser::_lookupLogin($user) . "\"/]', '', ev); return false;});";
1116 });
1118 $cards[] = $f->card()->standard($name, $f->image()->responsive(ilObjUser::_getPersonalPicturePath($user, "small"), $name))
1119 ->withSections(array($b));
1120 }
1121 $deck = $f->deck($cards)->withLargeCardsSize();
1122
1123 return $r->renderAsync($deck);
1124 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static _getPersonalPicturePath(int $usr_id, string $size='small', bool $force_pic=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=null)
Default behaviour is:
static getSystemMessageHTML(string $a_txt, string $a_type="info")
Get HTML for a system message.

References Vendor\Package\$b, $DIC, Vendor\Package\$f, $id, $lng, 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 99 of file class.ilInternalLinkGUI.php.

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

1066 {
1067 $form = new ilPropertyFormGUI();
1068 $form->setId("link_user_search_form");
1069
1070 // user search
1071 $ti = new ilTextInputGUI($this->lng->txt("obj_user"), "usr_search_str");
1072 $ti->setValue($this->request->getUserSearchStr());
1073 $form->addItem($ti);
1074
1075 $form->addCommandButton("searchUser", $this->lng->txt("search"));
1076
1077 return $form;
1078 }
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 743 of file class.ilInternalLinkGUI.php.

747 : void {
748 // output thumbnail
749 if ($this->getSetLinkTargetScript() !== "") {
750 $tpl->setCurrentBlock("thumbnail_link");
751 $suff = "_link";
752 } else {
753 $tpl->setCurrentBlock("thumbnail_js");
754 $suff = "_js";
755 }
756
757 $tpl->setCurrentBlock("thumb" . $suff);
759 "THUMB",
760 $this->thumbs_gui->getThumbHtml($a_id)
761 );
763
764 if ($this->getSetLinkTargetScript() !== "") {
765 $tpl->setCurrentBlock("thumbnail_link");
766 } else {
767 $tpl->setCurrentBlock("thumbnail_js");
768 }
770 }
setCurrentBlock(string $part=self::DEFAULT_BLOCK)

References ILIAS\News\Common\Table\$tpl, and ILIAS\UICore\GlobalTemplate\setCurrentBlock().

+ Here is the call graph for this function:

◆ prepareJavascriptOutput()

ilInternalLinkGUI::prepareJavascriptOutput ( string  $str)

Prepare output for JS enabled editing.

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

254 : string
255 {
256 return htmlspecialchars($str, ENT_QUOTES);
257 }

◆ refreshRepositorySelector()

ilInternalLinkGUI::refreshRepositorySelector ( )

Refresh Repository Selector.

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

896 : void
897 {
898 $output = $this->selectRepositoryItem();
899 echo $output;
900 exit;
901 }
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 965 of file class.ilInternalLinkGUI.php.

974 : void {
975 $chapterRowBlock = "chapter_row_js";
976 $anchor_row_block = "anchor_link_js";
977
978 $target_str = ($this->link_target === "")
979 ? ""
980 : " target=\"" . $this->link_target . "\"";
981
982 if (count($a_anchors) > 0) {
983 foreach ($a_anchors as $anchor) {
984 if ($this->getSetLinkTargetScript() !== "") {
985 // not implemented yet (anchors that work with map areas)
986
987 /*$tpl->setCurrentBlock("anchor_link");
988 $tpl->setVariable("ALINK",
989 ilUtil::appendUrlParameterString($this->getSetLinkTargetScript(),
990 "linktype=".$a_type.
991 "&linktarget=il__".$a_type_short."_".$a_obj_id.
992 "&linktargetframe=".$this->link_target).
993 "&linkanchor=".$anchor);
994 $tpl->setVariable("TXT_ALINK", "#" . $anchor);
995 $tpl->parseCurrentBlock();*/
996 } else {
997 $tpl->setCurrentBlock($anchor_row_block);
999 "ALINK_BEGIN",
1000 $this->prepareJavascriptOutput("[iln " . $a_bb_type . "=\"" . $a_obj_id . "\"" . $target_str . " anchor=\"$anchor\"]")
1001 );
1002 $tpl->setVariable("ALINK_END", "[/iln]");
1003 $tpl->setVariable("TXT_LINK", "#" . $anchor);
1005 }
1006 }
1007 }
1008
1009 if ($this->getSetLinkTargetScript() !== "") {
1011 if ($a_type === "MediaObject") {
1012 $this->outputThumbnail($tpl, $a_obj_id);
1013 }
1014 $tpl->setCurrentBlock("link_row");
1015 $tpl->setVariable("TXT_CHAPTER", $a_title);
1017 "LINK",
1019 $this->getSetLinkTargetScript(),
1020 "linktype=" . $a_type .
1021 "&linktarget=il__" . $a_type_short . "_" . $a_obj_id .
1022 "&linktargetframe=" . $this->link_target
1023 )
1024 );
1025 } else {
1026 $tpl->setCurrentBlock($chapterRowBlock);
1027 if ($a_type === "MediaObject") {
1028 $this->outputThumbnail($tpl, $a_obj_id);
1029 $tpl->setCurrentBlock($chapterRowBlock);
1030 }
1031 $tpl->setVariable("TXT_CHAPTER", $a_title);
1032 if ($a_type === "MediaObject" && empty($target_str)) {
1034 "LINK_BEGIN",
1035 $this->prepareJavascriptOutput("[iln " . $a_bb_type . "=\"" . $a_obj_id . "\"/]")
1036 );
1037 $tpl->setVariable("LINK_END", "");
1038 } else {
1040 "LINK_BEGIN",
1041 $this->prepareJavascriptOutput("[iln " . $a_bb_type . "=\"" . $a_obj_id . "\"" . $target_str . "]")
1042 );
1043 $tpl->setVariable("LINK_CONTENT", $a_link_content);
1044 $tpl->setVariable("LINK_END", "[/iln]");
1045 }
1046 }
1048
1049 $tpl->setCurrentBlock("row");
1051 }
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 ILIAS\News\Common\Table\$tpl, ILIAS\UICore\GlobalTemplate\parseCurrentBlock(), ILIAS\UICore\GlobalTemplate\setCurrentBlock(), and ILIAS\UICore\GlobalTemplate\setVariable().

Referenced by showLinkHelp().

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

◆ resetLinkList()

ilInternalLinkGUI::resetLinkList ( )

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

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

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 720 of file class.ilInternalLinkGUI.php.

720 : void
721 {
722 if ($_FILES["link_file"]["name"] != "") {
723 $fileObj = new ilObjFile();
724 $fileObj->setType("file");
725 $fileObj->setTitle($_FILES["link_file"]["name"]);
726 $fileObj->setDescription("");
727 $fileObj->setFileName($_FILES["link_file"]["name"]);
728 $fileObj->setMode("filelist");
729 $fileObj->create();
730 // upload file to filesystem
731 $fileObj->getUploadFile(
732 $_FILES["link_file"]["tmp_name"],
733 $_FILES["link_file"]["name"]
734 );
735 $this->uploaded_file = $fileObj;
736 }
737 $this->showLinkHelp();
738 }
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 878 of file class.ilInternalLinkGUI.php.

878 : string
879 {
880 $ilCtrl = $this->ctrl;
881
882 $ilCtrl->setParameter($this, "link_par_fold_id", "");
883
884 $exp = new ilIntLinkRepItemExplorerGUI($this, "selectRepositoryItem");
885 $exp->setSetLinkTargetScript($this->getSetLinkTargetScript());
886
887 if (!$exp->handleCommand()) {
888 return $exp->getHTML();
889 }
890 return "";
891 }
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 209 of file class.ilInternalLinkGUI.php.

209 : void
210 {
211 $this->filter_white_list = $a_white_list;
212 }

◆ setMedPoolFolder()

ilInternalLinkGUI::setMedPoolFolder ( )

select media pool folder

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

789 : void
790 {
792 $ctrl->setParameter($this, "link_par_fold_id", $this->request->getMediaPoolFolder());
793 $ctrl->redirect($this, "showLinkHelp", "", true);
794 }

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

+ Here is the call graph for this function:

◆ setReturn()

ilInternalLinkGUI::setReturn ( string  $a_return)

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

191 : void
192 {
193 $this->return = $a_return;
194 }

◆ setSetLinkTargetScript()

ilInternalLinkGUI::setSetLinkTargetScript ( string  $a_script)

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

186 : void
187 {
188 $this->set_link_script = $a_script;
189 }

◆ showLinkHelp()

ilInternalLinkGUI::showLinkHelp ( )

Show link help list.

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

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

References $base_link_type, $ctrl, $page, $parent_obj_id, $parent_type, ILIAS\News\Common\Table\$tpl, $user, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ilPCParagraph\_readAnchors(), addUser(), changeTargetObject(), ILIAS\Repository\ctrl(), exit, ilLegacyFormElementsUtil\formSelect(), ILIAS\UICore\GlobalTemplate\get(), ilPortfolioPage\getAllPortfolioPages(), ilWikiPage\getAllWikiPages(), getFileLinkHTML(), ilUtil\getImagePath(), ilLMPageObject\getPageList(), ilUtil\getStyleSheetLocation(), ILIAS\Repository\lng(), ilMediaPoolItem\lookupForeignId(), ILIAS\UICore\GlobalTemplate\parseCurrentBlock(), renderLink(), selectRepositoryItem(), ILIAS\UICore\GlobalTemplate\setCurrentBlock(), and ILIAS\UICore\GlobalTemplate\setVariable().

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 36 of file class.ilInternalLinkGUI.php.

Referenced by showLinkHelp().

◆ $ctrl

ilCtrl ilInternalLinkGUI::$ctrl

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

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

◆ $default_link_type

string ilInternalLinkGUI::$default_link_type = ""
protected

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

◆ $default_parent_obj_id

int ilInternalLinkGUI::$default_parent_obj_id = 0
protected

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

Referenced by init().

◆ $default_parent_obj_type

string ilInternalLinkGUI::$default_parent_obj_type
protected

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

◆ $default_parent_ref_id

int ilInternalLinkGUI::$default_parent_ref_id = 0
protected

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

Referenced by init().

◆ $filter_link_types

array ilInternalLinkGUI::$filter_link_types = []
protected

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

◆ $filter_white_list

bool ilInternalLinkGUI::$filter_white_list = false
protected

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

◆ $link_target

string ilInternalLinkGUI::$link_target = ""
protected

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

◆ $link_type

string ilInternalLinkGUI::$link_type = ""
protected

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

Referenced by init().

◆ $lng

ilLanguage ilInternalLinkGUI::$lng
protected

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

Referenced by getFileLinkHTML(), and init().

◆ $ltypes

array ilInternalLinkGUI::$ltypes = []
protected

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

Referenced by init().

◆ $parent_fold_id

int ilInternalLinkGUI::$parent_fold_id
protected

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

◆ $parent_obj_id

int ilInternalLinkGUI::$parent_obj_id = 0
protected

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

Referenced by showLinkHelp().

◆ $parent_ref_id

int ilInternalLinkGUI::$parent_ref_id = 0
protected

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

◆ $parent_type

array ilInternalLinkGUI::$parent_type = []
protected

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

Referenced by showLinkHelp().

◆ $request

StandardGUIRequest ilInternalLinkGUI::$request
protected

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

◆ $return

string ilInternalLinkGUI::$return
protected

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

◆ $set_link_script

string ilInternalLinkGUI::$set_link_script = ""

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

Referenced by getSetLinkTargetScript().

◆ $thumbs_gui

ILIAS MediaObjects Thumbs ThumbsGUI ilInternalLinkGUI::$thumbs_gui
protected

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

◆ $tree

ilTree ilInternalLinkGUI::$tree
protected

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

Referenced by init().

◆ $uploaded_file

ilObjFile ilInternalLinkGUI::$uploaded_file = null
protected

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

◆ $user

ilObjUser ilInternalLinkGUI::$user
protected

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

Referenced by showLinkHelp().


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