33 string $cmd_gui_class,
42 $this->cmd_gui = $cmd_gui_class;
56 $this->profile_back_url =
$url;
70 if (0 === count($layoutLinkTargets)) {
74 $link_info =
"<LinkTargets>";
75 foreach ($layoutLinkTargets as $k => $t) {
76 $link_info .=
"<LinkTarget TargetFrame=\"" . $t[
"Type"] .
"\" LinkTarget=\"" . $t[
"Frame"] .
"\" OnClick=\"" . $t[
"OnClick"] .
"\" />";
78 $link_info .=
"</LinkTargets>";
85 $link_info =
"<IntLinkInfos>";
86 foreach ($int_links as $int_link) {
87 $target = $int_link[
"Target"];
88 if (substr($target, 0, 4) ==
"il__") {
89 $target_arr = explode(
"_", $target);
90 $target_id = $target_arr[count($target_arr) - 1];
91 $type = $int_link[
"Type"];
93 $targetframe = ($int_link[
"TargetFrame"] !=
"")
94 ? $int_link[
"TargetFrame"]
98 if ($targetframe !=
"None") {
103 $anc = $anc_add =
"";
104 if (($int_link[
"Anchor"] ??
"") !=
"") {
105 $anc = $int_link[
"Anchor"];
106 $anc_add =
"_" . rawurlencode($int_link[
"Anchor"]);
113 case "StructureObject":
115 if ($type ==
"PageObject") {
116 $href =
"./goto.php?target=pg_" . $target_id . $anc_add;
118 $href =
"./goto.php?target=st_" . $target_id;
126 if ($targetframe ==
"Glossary") {
129 $href =
"./goto.php?target=git_" . $target_id;
133 if ($this->offline) {
134 $href =
"media_" . $target_id .
".html";
136 $this->
ctrl->setParameterByClass($this->cmd_gui,
"mob_id", $target_id);
137 $href = $this->
ctrl->getLinkTargetByClass(
144 $this->
ctrl->setParameterByClass($this->cmd_gui,
"mob_id",
"");
150 if (($int_link[
"Anchor"] ??
"") !=
"") {
151 $wiki_anc =
"#" . rawurlencode(
"copganc_" . $int_link[
"Anchor"]);
156 case "PortfolioPage":
160 case "RepositoryItem":
163 $href =
"./goto.php?target=" . $obj_type .
"_" . $target_id;
167 if (!$this->offline) {
175 if ($obj_type ==
"usr") {
178 $this->
ctrl->setParameterByClass(PublicProfileGUI::class,
"user_id", $target_id);
180 $this->
ctrl->setParameterByClass(
181 PublicProfileGUI::class,
188 $href = $this->
ctrl->getLinkTargetByClass(
189 [PublicProfileGUI::class],
196 $this->
ctrl->setParameterByClass(PublicProfileGUI::class,
"user_id",
"");
198 $lcontent = str_replace(
"&",
"&", htmlentities($lcontent));
202 if ($href !=
"" || $type ===
"User") {
203 $anc_par =
'Anchor="' . $anc .
'"';
204 $link_info .=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" " . $anc_par .
" " .
205 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" LinkContent=\"$lcontent\" />";
209 $link_info .=
"</IntLinkInfos>";
216 if ($this->offline) {
217 return "fullscreen.html";
220 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)
static _lookupObjId(int $ref_id)
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)
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)