ILIAS  release_8 Revision v8.24
ilPermanentLinkGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilPermanentLinkGUI:

Public Member Functions

 __construct (string $a_type, int $a_id, string $a_append="", string $a_target="")
 Example: type = "wiki", id (ref_id) = "234", append = "_Start_Page". More...
 
 setIncludePermanentLinkText (bool $a_includepermanentlinktext)
 Set Include permanent link text. More...
 
 getIncludePermanentLinkText ()
 Include permanent link text. More...
 
 setType (string $a_type)
 
 getType ()
 
 setId (string $a_id)
 
 getId ()
 
 setAppend (string $a_append)
 
 getAppend ()
 
 setTarget (string $a_target)
 
 getTarget ()
 
 setTitle (string $a_val)
 
 getTitle ()
 
 getHTML ()
 

Protected Attributes

ilLanguage $lng
 
ilCtrl $ctrl
 
ilObjectDataCache $obj_data_cache
 
bool $align_center = true
 
bool $includepermanentlinktext = false
 
string $type = ""
 
string $id = ""
 
string $append = ""
 
string $target = ""
 
string $title = ""
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class for permanent links

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de @ilCtrl_Calls ilPermanentLinkGUI: ilNoteGUI, ilColumnGUI, ilPublicUserProfileGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilPermanentLinkGUI::__construct ( string  $a_type,
int  $a_id,
string  $a_append = "",
string  $a_target = "" 
)

Example: type = "wiki", id (ref_id) = "234", append = "_Start_Page".

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

45 {
46 global $DIC;
47
48 $this->lng = $DIC->language();
49 $this->ctrl = $DIC->ctrl();
50 $this->obj_data_cache = $DIC["ilObjDataCache"];
51 $this->setType($a_type);
52 $this->setId($a_id);
53 $this->setAppend($a_append);
54 $this->setIncludePermanentLinkText(true);
55 $this->setTarget($a_target);
56 }
setIncludePermanentLinkText(bool $a_includepermanentlinktext)
Set Include permanent link text.
global $DIC
Definition: feed.php:28

References $DIC, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), setAppend(), setId(), setIncludePermanentLinkText(), setTarget(), and setType().

+ Here is the call graph for this function:

Member Function Documentation

◆ getAppend()

ilPermanentLinkGUI::getAppend ( )

Definition at line 99 of file class.ilPermanentLinkGUI.php.

99 : string
100 {
101 return $this->append;
102 }

References $append.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getHTML()

ilPermanentLinkGUI::getHTML ( )

Definition at line 124 of file class.ilPermanentLinkGUI.php.

124 : string
125 {
127 $ilObjDataCache = $this->obj_data_cache;
128
129 $tpl = new ilTemplate(
130 "tpl.permanent_link.html",
131 true,
132 true,
133 "Services/PermanentLink"
134 );
135
137 $this->getId(),
138 $this->getType(),
139 true,
140 $this->getAppend()
141 );
142 if ($this->getIncludePermanentLinkText()) {
143 $tpl->setVariable("TXT_PERMA", $lng->txt("perma_link") . ":");
144 }
145
146 $title = '';
147
148 if ($this->getTitle() != "") {
149 $title = $this->getTitle();
150 } elseif (is_numeric($this->getId())) {
151 $obj_id = $ilObjDataCache->lookupObjId((int) $this->getId());
152 $title = $ilObjDataCache->lookupTitle($obj_id);
153 }
154
155 $tpl->setVariable("TXT_BOOKMARK_DEFAULT", $title);
156
157 $tpl->setVariable("LINK", $href);
158
159 $tpl->setVariable("ALIGN", "left");
160
161 if ($this->getTarget() != "") {
162 $tpl->setVariable("TARGET", 'target="' . $this->getTarget() . '"');
163 }
164
165 return $tpl->get();
166 }
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...
ilObjectDataCache $obj_data_cache
getIncludePermanentLinkText()
Include permanent link text.
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

References $lng, $obj_data_cache, $title, $tpl, ilLink\_getStaticLink(), getAppend(), getId(), getIncludePermanentLinkText(), getTarget(), getTitle(), getType(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ getId()

ilPermanentLinkGUI::getId ( )

Definition at line 89 of file class.ilPermanentLinkGUI.php.

89 : string
90 {
91 return $this->id;
92 }

References $id.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getIncludePermanentLinkText()

ilPermanentLinkGUI::getIncludePermanentLinkText ( )

Include permanent link text.

Definition at line 69 of file class.ilPermanentLinkGUI.php.

69 : bool
70 {
72 }

References $includepermanentlinktext.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getTarget()

ilPermanentLinkGUI::getTarget ( )

Definition at line 109 of file class.ilPermanentLinkGUI.php.

109 : string
110 {
111 return $this->target;
112 }

References $target.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getTitle()

ilPermanentLinkGUI::getTitle ( )

Definition at line 119 of file class.ilPermanentLinkGUI.php.

119 : string
120 {
121 return $this->title;
122 }

References $title.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getType()

ilPermanentLinkGUI::getType ( )

Definition at line 79 of file class.ilPermanentLinkGUI.php.

79 : string
80 {
81 return $this->type;
82 }

References $type.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ setAppend()

ilPermanentLinkGUI::setAppend ( string  $a_append)

Definition at line 94 of file class.ilPermanentLinkGUI.php.

94 : void
95 {
96 $this->append = $a_append;
97 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setId()

ilPermanentLinkGUI::setId ( string  $a_id)

Definition at line 84 of file class.ilPermanentLinkGUI.php.

84 : void
85 {
86 $this->id = $a_id;
87 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setIncludePermanentLinkText()

ilPermanentLinkGUI::setIncludePermanentLinkText ( bool  $a_includepermanentlinktext)

Set Include permanent link text.

Definition at line 61 of file class.ilPermanentLinkGUI.php.

61 : void
62 {
63 $this->includepermanentlinktext = $a_includepermanentlinktext;
64 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setTarget()

ilPermanentLinkGUI::setTarget ( string  $a_target)

Definition at line 104 of file class.ilPermanentLinkGUI.php.

104 : void
105 {
106 $this->target = $a_target;
107 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setTitle()

ilPermanentLinkGUI::setTitle ( string  $a_val)

Definition at line 114 of file class.ilPermanentLinkGUI.php.

114 : void
115 {
116 $this->title = $a_val;
117 }

◆ setType()

ilPermanentLinkGUI::setType ( string  $a_type)

Definition at line 74 of file class.ilPermanentLinkGUI.php.

74 : void
75 {
76 $this->type = $a_type;
77 }

Referenced by __construct().

+ Here is the caller graph for this function:

Field Documentation

◆ $align_center

bool ilPermanentLinkGUI::$align_center = true
protected

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

◆ $append

string ilPermanentLinkGUI::$append = ""
protected

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

Referenced by getAppend().

◆ $ctrl

ilCtrl ilPermanentLinkGUI::$ctrl
protected

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

◆ $id

string ilPermanentLinkGUI::$id = ""
protected

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

Referenced by getId().

◆ $includepermanentlinktext

bool ilPermanentLinkGUI::$includepermanentlinktext = false
protected

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

Referenced by getIncludePermanentLinkText().

◆ $lng

ilLanguage ilPermanentLinkGUI::$lng
protected

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

Referenced by getHTML().

◆ $obj_data_cache

ilObjectDataCache ilPermanentLinkGUI::$obj_data_cache
protected

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

Referenced by getHTML().

◆ $target

string ilPermanentLinkGUI::$target = ""
protected

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

Referenced by getTarget().

◆ $title

string ilPermanentLinkGUI::$title = ""
protected

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

Referenced by getHTML(), and getTitle().

◆ $type

string ilPermanentLinkGUI::$type = ""
protected

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

Referenced by getType().


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