34 string $cmd_gui_class,
43 $this->cmd_gui = $cmd_gui_class;
48 $this->static_url =
$DIC[
"static_url"];
58 $this->profile_back_url =
$url;
72 if (0 === count($layoutLinkTargets)) {
76 $link_info =
"<LinkTargets>";
77 foreach ($layoutLinkTargets as $k => $t) {
78 $link_info .=
"<LinkTarget TargetFrame=\"" . $t[
"Type"] .
"\" LinkTarget=\"" . $t[
"Frame"] .
"\" OnClick=\"" . $t[
"OnClick"] .
"\" />";
80 $link_info .=
"</LinkTargets>";
87 $link_info =
"<IntLinkInfos>";
88 foreach ($int_links as $int_link) {
89 $target = $int_link[
"Target"];
90 if (substr($target, 0, 4) ==
"il__") {
91 $target_arr = explode(
"_", $target);
92 $target_id = $target_arr[count($target_arr) - 1];
93 $type = $int_link[
"Type"];
95 $targetframe = ($int_link[
"TargetFrame"] !=
"")
96 ? $int_link[
"TargetFrame"]
100 if ($targetframe !=
"None") {
105 $anc = $anc_add =
"";
106 if (($int_link[
"Anchor"] ??
"") !=
"") {
107 $anc = $int_link[
"Anchor"];
108 $anc_add =
"_" . rawurlencode($int_link[
"Anchor"]);
115 case "StructureObject":
117 if ($type ===
"PageObject") {
118 $href = (string) $this->static_url->builder()->build(
124 $href = (string) $this->static_url->builder()->build(
136 if ($targetframe ==
"Glossary") {
139 $href =
"./goto.php?target=git_" . $target_id;
143 if ($this->offline) {
144 $href =
"media_" . $target_id .
".html";
146 $this->
ctrl->setParameterByClass($this->cmd_gui,
"mob_id", $target_id);
147 $href = $this->
ctrl->getLinkTargetByClass(
154 $this->
ctrl->setParameterByClass($this->cmd_gui,
"mob_id",
"");
160 if (($int_link[
"Anchor"] ??
"") !=
"") {
161 $wiki_anc =
"#" . rawurlencode(
"copganc_" . $int_link[
"Anchor"]);
166 case "PortfolioPage":
170 case "RepositoryItem":
172 if ((
int) $target_id > 0) {
173 $href = (string) $this->static_url->builder()->build(
175 new \
ILIAS\Data\ReferenceId($target_id)
183 if (!$this->offline) {
191 if ($obj_type ==
"usr") {
194 $this->
ctrl->setParameterByClass(PublicProfileGUI::class,
"user_id", $target_id);
196 $this->
ctrl->setParameterByClass(
197 PublicProfileGUI::class,
204 $href = $this->
ctrl->getLinkTargetByClass(
205 [ilPublicProfileBaseClassGUI::class, PublicProfileGUI::class],
212 $this->
ctrl->setParameterByClass(PublicProfileGUI::class,
"user_id",
"");
214 $lcontent = str_replace(
"&",
"&", htmlentities($lcontent));
218 if ($href !=
"" || $type ===
"User") {
219 $anc_par =
'Anchor="' . $anc .
'"';
220 $link_info .=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" " . $anc_par .
" " .
221 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" LinkContent=\"$lcontent\" />";
225 $link_info .=
"</IntLinkInfos>";
232 if ($this->offline) {
233 return "fullscreen.html";
236 return $this->
ctrl->getLinkTargetByClass($this->cmd_gui,
"fullscreen",
"",
false,
false);
GUI class for public user profile presentation.
Class ilCtrl provides processing control methods.
static _lookupContObjID(int $a_id)
get learning module id for lm object
static _lookupType(int $id, bool $reference=false)
getLinkXML(array $int_links)
setOffline(bool $offline=true)
setProfileBackUrl(string $url)
__construct(string $cmd_gui_class, bool $offline=false, string $profile_back_url="", ?ilCtrl $ctrl=null)
ILIAS StaticURL Services $static_url
static getGotoForPortfolioPageTarget(int $a_target, bool $a_offline=false)
Get goto href for portfolio page 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 hasPublicProfile(int $a_user_id)
static getGotoForWikiPageTarget(string $a_target, bool $a_offline=false)
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.