ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilHelp Class Reference

Online help application class. More...

+ Collaboration diagram for ilHelp:

Static Public Member Functions

static getTooltipPresentationText ($a_tt_id)
 Get tooltip for id. More...
 
static getObjCreationTooltipText ($a_type)
 Get object_creation tooltip tab text. More...
 
static getMainMenuTooltip ($a_item_id)
 Get main menu tooltip. More...
 
static getAllTooltips ($a_comp="", $a_module_id=0)
 Get all tooltips. More...
 
static addTooltip ($a_tt_id, $a_text, $a_module_id=0)
 Add tooltip. More...
 
static updateTooltip ($a_id, $a_text, $a_tt_id)
 Update tooltip. More...
 
static getTooltipComponents ($a_module_id=0)
 Get all tooltip components. More...
 
static deleteTooltip ($a_id)
 Delete tooltip. More...
 
static deleteTooltipsOfModule ($a_id)
 Delete tooltips of module. More...
 
static getHelpLMId ()
 Get help lm id. More...
 

Detailed Description

Online help application class.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 11 of file class.ilHelp.php.

Member Function Documentation

◆ addTooltip()

static ilHelp::addTooltip (   $a_tt_id,
  $a_text,
  $a_module_id = 0 
)
static

Add tooltip.

Parameters

return

Definition at line 142 of file class.ilHelp.php.

143 {
144 global $ilDB;
145
146 $fu = strpos($a_tt_id, "_");
147 $comp = substr($a_tt_id, 0, $fu);
148
149 $nid = $ilDB->nextId("help_tooltip");
150 $ilDB->manipulate("INSERT INTO help_tooltip ".
151 "(id, tt_text, tt_id, comp,module_id) VALUES (".
152 $ilDB->quote($nid, "integer").",".
153 $ilDB->quote($a_text, "text").",".
154 $ilDB->quote($a_tt_id, "text").",".
155 $ilDB->quote($comp, "text").",".
156 $ilDB->quote($a_module_id, "integer").
157 ")");
158 }
global $ilDB

References $ilDB.

Referenced by ilObjContentObjectGUI\addTooltip(), and ilHelpDataSet\importRecord().

+ Here is the caller graph for this function:

◆ deleteTooltip()

static ilHelp::deleteTooltip (   $a_id)
static

Delete tooltip.

Parameters

return

Definition at line 209 of file class.ilHelp.php.

210 {
211 global $ilDB;
212
213 $ilDB->manipulate("DELETE FROM help_tooltip WHERE ".
214 " id = ".$ilDB->quote($a_id, "integer")
215 );
216 }

References $ilDB.

Referenced by ilObjContentObjectGUI\deleteTooltips().

+ Here is the caller graph for this function:

◆ deleteTooltipsOfModule()

static ilHelp::deleteTooltipsOfModule (   $a_id)
static

Delete tooltips of module.

Parameters

return

Definition at line 224 of file class.ilHelp.php.

225 {
226 global $ilDB;
227
228 $ilDB->manipulate("DELETE FROM help_tooltip WHERE ".
229 " module_id = ".$ilDB->quote($a_id, "integer")
230 );
231
232 }

References $ilDB.

Referenced by ilObjHelpSettings\deleteModule().

+ Here is the caller graph for this function:

◆ getAllTooltips()

static ilHelp::getAllTooltips (   $a_comp = "",
  $a_module_id = 0 
)
static

Get all tooltips.

Parameters

return

Definition at line 116 of file class.ilHelp.php.

117 {
118 global $ilDB;
119
120 $q = "SELECT * FROM help_tooltip";
121 $q.= " WHERE module_id = ".$ilDB->quote($a_module_id, "integer");
122 if ($a_comp != "")
123 {
124 $q.= " AND comp = ".$ilDB->quote($a_comp, "text");
125 }
126 $set = $ilDB->query($q);
127 $tts = array();
128 while ($rec = $ilDB->fetchAssoc($set))
129 {
130 $tts[$rec["id"]] = array("id" => $rec["id"], "text" => $rec["tt_text"],
131 "tt_id" => $rec["tt_id"]);
132 }
133 return $tts;
134 }

References $ilDB.

Referenced by ilHelpTooltipTableGUI\__construct().

+ Here is the caller graph for this function:

◆ getHelpLMId()

static ilHelp::getHelpLMId ( )
static

Get help lm id.

Returns
int help learning module id

Definition at line 239 of file class.ilHelp.php.

240 {
241 global $ilSetting;
242
243 $lm_id = 0;
244
245 if (OH_REF_ID > 0)
246 {
247 $lm_id = ilObject::_lookupObjId(OH_REF_ID);
248 }
249 else
250 {
251 $hm = (int) $ilSetting->get("help_module");
252 if ($hm > 0)
253 {
254 include_once("./Services/Help/classes/class.ilObjHelpSettings.php");
256 }
257 }
258
259 return $lm_id;
260 }
lookupModuleLmId($a_id)
lookup module lm id
static _lookupObjId($a_id)
global $ilSetting
Definition: privfeed.php:40

References $ilSetting, ilObject\_lookupObjId(), and ilObjHelpSettings\lookupModuleLmId().

Referenced by ilHelpGUI\search(), and ilHelpGUI\showHelp().

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

◆ getMainMenuTooltip()

static ilHelp::getMainMenuTooltip (   $a_item_id)
static

Get main menu tooltip.

Parameters
string$a_mm_id
Returns
string tooltip text

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

105 {
106 return self::getTooltipPresentationText($a_item_id);
107 }
static getTooltipPresentationText($a_tt_id)
Get tooltip for id.

References getTooltipPresentationText().

Referenced by ilAdministrationGUI\getDropDown(), and ilMainMenuGUI\renderEntry().

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

◆ getObjCreationTooltipText()

static ilHelp::getObjCreationTooltipText (   $a_type)
static

Get object_creation tooltip tab text.

Parameters
string$a_tab_idtab id
Returns
string tooltip text

Definition at line 93 of file class.ilHelp.php.

94 {
95 return self::getTooltipPresentationText($a_type."_create");
96 }

References getTooltipPresentationText().

Referenced by ilObjectAddNewItemGUI\getHTML().

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

◆ getTooltipComponents()

static ilHelp::getTooltipComponents (   $a_module_id = 0)
static

Get all tooltip components.

Parameters

return

Definition at line 188 of file class.ilHelp.php.

189 {
190 global $ilDB, $lng;
191
192 $set = $ilDB->query("SELECT DISTINCT comp FROM help_tooltip ".
193 " WHERE module_id = ".$ilDB->quote($a_module_id, "integer").
194 " ORDER BY comp ");
195 $comps[""] = "- ".$lng->txt("help_all")." -";
196 while ($rec = $ilDB->fetchAssoc($set))
197 {
198 $comps[$rec["comp"]] = $rec["comp"];
199 }
200 return $comps;
201 }
global $lng
Definition: privfeed.php:40

References $ilDB, and $lng.

Referenced by ilObjContentObjectGUI\showTooltipList().

+ Here is the caller graph for this function:

◆ getTooltipPresentationText()

static ilHelp::getTooltipPresentationText (   $a_tt_id)
static

Get tooltip for id.

Parameters

return

Definition at line 19 of file class.ilHelp.php.

20 {
21 global $ilDB, $ilSetting, $ilUser;
22
23
24 if ($ilUser->getLanguage() != "de")
25 {
26 return "";
27 }
28
29 if ($ilSetting->get("help_mode") == "1")
30 {
31 return "";
32 }
33
34 if (OH_REF_ID > 0)
35 {
36 $module_id = 0;
37 }
38 else
39 {
40 $module_id = (int) $ilSetting->get("help_module");
41 if ($module_id == 0)
42 {
43 return "";
44 }
45 }
46
47 $set = $ilDB->query("SELECT tt_text FROM help_tooltip ".
48 " WHERE tt_id = ".$ilDB->quote($a_tt_id, "text").
49 " AND module_id = ".$ilDB->quote($module_id, "integer")
50 );
51 $rec = $ilDB->fetchAssoc($set);
52 if ($rec["tt_text"] != "")
53 {
54 $t = $rec["tt_text"];
55 if ($module_id == 0)
56 {
57 $t.="<br/><i class='small'>".$a_tt_id."</i>";
58 }
59 return $t;
60 }
61 else // try to get general version
62 {
63 $fu = strpos($a_tt_id, "_");
64 $gen_tt_id = "*".substr($a_tt_id, $fu);
65 $set = $ilDB->query("SELECT tt_text FROM help_tooltip ".
66 " WHERE tt_id = ".$ilDB->quote($gen_tt_id, "text").
67 " AND module_id = ".$ilDB->quote($module_id, "integer")
68 );
69 $rec = $ilDB->fetchAssoc($set);
70 if ($rec["tt_text"] != "")
71 {
72 $t = $rec["tt_text"];
73 if ($module_id == 0)
74 {
75 $t.="<br/><i class='small'>".$a_tt_id."</i>";
76 }
77 return $t;
78 }
79 }
80 if ($module_id == 0)
81 {
82 return "<i>".$a_tt_id."</i>";
83 }
84 return "";
85 }
global $ilUser
Definition: imgupload.php:15

References $ilDB, $ilSetting, $ilUser, and $t.

Referenced by getMainMenuTooltip(), getObjCreationTooltipText(), and ilHelpGUI\getTabTooltipText().

+ Here is the caller graph for this function:

◆ updateTooltip()

static ilHelp::updateTooltip (   $a_id,
  $a_text,
  $a_tt_id 
)
static

Update tooltip.

Parameters

return

Definition at line 166 of file class.ilHelp.php.

167 {
168 global $ilDB;
169
170 $fu = strpos($a_tt_id, "_");
171 $comp = substr($a_tt_id, 0, $fu);
172
173 $ilDB->manipulate("UPDATE help_tooltip SET ".
174 " tt_text = ".$ilDB->quote($a_text, "text").", ".
175 " tt_id = ".$ilDB->quote($a_tt_id, "text").", ".
176 " comp = ".$ilDB->quote($comp, "text").
177 " WHERE id = ".$ilDB->quote($a_id, "integer")
178 );
179 }

References $ilDB.

Referenced by ilObjContentObjectGUI\saveTooltips().

+ Here is the caller graph for this function:

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