ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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.
static getObjCreationTooltipText ($a_type)
 Get object_creation tooltip tab text.
static getMainMenuTooltip ($a_item_id)
 Get main menu tooltip.
static getAllTooltips ($a_comp="", $a_module_id=0)
 Get all tooltips.
static addTooltip ($a_tt_id, $a_text, $a_module_id=0)
 Add tooltip.
static updateTooltip ($a_id, $a_text, $a_tt_id)
 Update tooltip.
static getTooltipComponents ($a_module_id=0)
 Get all tooltip components.
static deleteTooltip ($a_id)
 Delete tooltip.
static deleteTooltipsOfModule ($a_id)
 Delete tooltips of module.

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:
class.ilHelp.php 38308 2012-11-21 16:15:12Z akill

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

Member Function Documentation

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.

Referenced by ilHelpDataSet\importRecord().

{
global $ilDB;
$fu = strpos($a_tt_id, "_");
$comp = substr($a_tt_id, 0, $fu);
$nid = $ilDB->nextId("help_tooltip");
$ilDB->manipulate("INSERT INTO help_tooltip ".
"(id, tt_text, tt_id, comp,module_id) VALUES (".
$ilDB->quote($nid, "integer").",".
$ilDB->quote($a_text, "text").",".
$ilDB->quote($a_tt_id, "text").",".
$ilDB->quote($comp, "text").",".
$ilDB->quote($a_module_id, "integer").
")");
}

+ Here is the caller graph for this function:

static ilHelp::deleteTooltip (   $a_id)
static

Delete tooltip.

Parameters
@return

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

Referenced by ilObjContentObjectGUI\deleteTooltips().

{
global $ilDB;
$ilDB->manipulate("DELETE FROM help_tooltip WHERE ".
" id = ".$ilDB->quote($a_id, "integer")
);
}

+ Here is the caller graph for this function:

static ilHelp::deleteTooltipsOfModule (   $a_id)
static

Delete tooltips of module.

Parameters
@return

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

Referenced by ilObjHelpSettings\deleteModule().

{
global $ilDB;
$ilDB->manipulate("DELETE FROM help_tooltip WHERE ".
" module_id = ".$ilDB->quote($a_id, "integer")
);
}

+ Here is the caller graph for this function:

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

Get all tooltips.

Parameters
@return

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

Referenced by ilHelpTooltipTableGUI\__construct().

{
global $ilDB;
$q = "SELECT * FROM help_tooltip";
$q.= " WHERE module_id = ".$ilDB->quote($a_module_id, "integer");
if ($a_comp != "")
{
$q.= " AND comp = ".$ilDB->quote($a_comp, "text");
}
$set = $ilDB->query($q);
$tts = array();
while ($rec = $ilDB->fetchAssoc($set))
{
$tts[$rec["id"]] = array("id" => $rec["id"], "text" => $rec["tt_text"],
"tt_id" => $rec["tt_id"]);
}
return $tts;
}

+ Here is the caller graph for this function:

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.

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:

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 getTooltipPresentationText().

Referenced by ilObjectAddNewItemGUI\getHTML().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Get all tooltip components.

Parameters
@return

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

References $lng.

Referenced by ilObjContentObjectGUI\showTooltipList().

{
global $ilDB, $lng;
$set = $ilDB->query("SELECT DISTINCT comp FROM help_tooltip ".
" WHERE module_id = ".$ilDB->quote($a_module_id, "integer").
" ORDER BY comp ");
$comps[""] = "- ".$lng->txt("help_all")." -";
while ($rec = $ilDB->fetchAssoc($set))
{
$comps[$rec["comp"]] = $rec["comp"];
}
return $comps;
}

+ Here is the caller graph for this function:

static ilHelp::getTooltipPresentationText (   $a_tt_id)
static

Get tooltip for id.

Parameters
@return

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

References $ilSetting, $ilUser, and $t.

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

{
global $ilDB, $ilSetting, $ilUser;
if ($ilUser->getLanguage() != "de")
{
return "";
}
if ($ilSetting->get("help_mode") == "1")
{
return "";
}
if (OH_REF_ID > 0)
{
$module_id = 0;
}
else
{
$module_id = (int) $ilSetting->get("help_module");
if ($module_id == 0)
{
return "";
}
}
$set = $ilDB->query("SELECT tt_text FROM help_tooltip ".
" WHERE tt_id = ".$ilDB->quote($a_tt_id, "text").
" AND module_id = ".$ilDB->quote($module_id, "integer")
);
$rec = $ilDB->fetchAssoc($set);
if ($rec["tt_text"] != "")
{
$t = $rec["tt_text"];
if ($module_id == 0)
{
$t.="<br/><i class='small'>".$a_tt_id."</i>";
}
return $t;
}
else // try to get general version
{
$fu = strpos($a_tt_id, "_");
$gen_tt_id = "*".substr($a_tt_id, $fu);
$set = $ilDB->query("SELECT tt_text FROM help_tooltip ".
" WHERE tt_id = ".$ilDB->quote($gen_tt_id, "text").
" AND module_id = ".$ilDB->quote($module_id, "integer")
);
$rec = $ilDB->fetchAssoc($set);
if ($rec["tt_text"] != "")
{
$t = $rec["tt_text"];
if ($module_id == 0)
{
$t.="<br/><i class='small'>".$a_tt_id."</i>";
}
return $t;
}
}
if ($module_id == 0)
{
return "<i>".$a_tt_id."</i>";
}
return "";
}

+ Here is the caller graph for this function:

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

Update tooltip.

Parameters
@return

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

Referenced by ilObjContentObjectGUI\saveTooltips().

{
global $ilDB;
$fu = strpos($a_tt_id, "_");
$comp = substr($a_tt_id, 0, $fu);
$ilDB->manipulate("UPDATE help_tooltip SET ".
" tt_text = ".$ilDB->quote($a_text, "text").", ".
" tt_id = ".$ilDB->quote($a_tt_id, "text").", ".
" comp = ".$ilDB->quote($comp, "text").
" WHERE id = ".$ilDB->quote($a_id, "integer")
);
}

+ Here is the caller graph for this function:


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