ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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

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

References $ilDB.

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

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
+ Here is the caller graph for this function:

◆ deleteTooltip()

static ilHelp::deleteTooltip (   $a_id)
static

Delete tooltip.

Parameters

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

References $ilDB.

Referenced by ilObjContentObjectGUI\deleteTooltips().

210  {
211  global $ilDB;
212 
213  $ilDB->manipulate("DELETE FROM help_tooltip WHERE ".
214  " id = ".$ilDB->quote($a_id, "integer")
215  );
216  }
global $ilDB
+ Here is the caller graph for this function:

◆ deleteTooltipsOfModule()

static ilHelp::deleteTooltipsOfModule (   $a_id)
static

Delete tooltips of module.

Parameters

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

References $ilDB.

Referenced by ilObjHelpSettings\deleteModule().

225  {
226  global $ilDB;
227 
228  $ilDB->manipulate("DELETE FROM help_tooltip WHERE ".
229  " module_id = ".$ilDB->quote($a_id, "integer")
230  );
231 
232  }
global $ilDB
+ Here is the caller graph for this function:

◆ getAllTooltips()

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

Get all tooltips.

Parameters

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

References $ilDB, and array.

Referenced by ilHelpTooltipTableGUI\__construct().

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  }
Create styles array
The data for the language used.
global $ilDB
+ 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.

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

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

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  }
static _lookupObjId($a_id)
static lookupModuleLmId($a_id)
lookup module lm id
global $ilSetting
Definition: privfeed.php:17
+ 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.

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

105  {
106  return self::getTooltipPresentationText($a_item_id);
107  }
+ 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.

References $a_type.

Referenced by ilObjectAddNewItemGUI\getHTML().

94  {
95  return self::getTooltipPresentationText($a_type."_create");
96  }
$a_type
Definition: workflow.php:93
+ Here is the caller graph for this function:

◆ getTooltipComponents()

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

Get all tooltip components.

Parameters

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

References $ilDB, and $lng.

Referenced by ilObjContentObjectGUI\showTooltipList().

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:17
global $ilDB
+ Here is the caller graph for this function:

◆ getTooltipPresentationText()

static ilHelp::getTooltipPresentationText (   $a_tt_id)
static

Get tooltip for id.

Parameters

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

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

Referenced by ilHelpGUI\getTabTooltipText().

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  }
$ilUser
Definition: imgupload.php:18
global $ilSetting
Definition: privfeed.php:17
global $ilDB
+ Here is the caller graph for this function:

◆ updateTooltip()

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

Update tooltip.

Parameters

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

References $ilDB.

Referenced by ilObjContentObjectGUI\saveTooltips().

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  }
global $ilDB
+ Here is the caller graph for this function:

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