Definition at line 23 of file TooltipsDBRepository.php.
 
◆ __construct()
      
        
          | ILIAS\Help\Tooltips\TooltipsDBRepository::__construct  | 
          ( | 
          \ilDBInterface  | 
          $db | ) | 
           | 
        
      
 
 
◆ addTooltip()
      
        
          | ILIAS\Help\Tooltips\TooltipsDBRepository::addTooltip  | 
          ( | 
          string  | 
          $a_tt_id,  | 
        
        
           | 
           | 
          string  | 
          $a_text,  | 
        
        
           | 
           | 
          int  | 
          $a_module_id = 0  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 95 of file TooltipsDBRepository.php.
  100         $fu = strpos($a_tt_id, 
"_");
   101         $comp = substr($a_tt_id, 0, $fu);
   103         $nid = $this->db->nextId(
"help_tooltip");
   104         $this->db->manipulate(
"INSERT INTO help_tooltip " .
   105             "(id, tt_text, tt_id, comp,module_id) VALUES (" .
   106             $this->db->quote($nid, 
"integer") . 
"," .
   107             $this->db->quote($a_text, 
"text") . 
"," .
   108             $this->db->quote($a_tt_id, 
"text") . 
"," .
   109             $this->db->quote($comp, 
"text") . 
"," .
   110             $this->db->quote($a_module_id, 
"integer") .
  
 
 
◆ deleteTooltip()
      
        
          | ILIAS\Help\Tooltips\TooltipsDBRepository::deleteTooltip  | 
          ( | 
          int  | 
          $a_id | ) | 
           | 
        
      
 
Definition at line 148 of file TooltipsDBRepository.php.
  151         $this->db->manipulate(
   152             "DELETE FROM help_tooltip WHERE " .
   153             " id = " . $this->db->quote($a_id, 
"integer")
  
 
 
◆ deleteTooltipsOfModule()
      
        
          | ILIAS\Help\Tooltips\TooltipsDBRepository::deleteTooltipsOfModule  | 
          ( | 
          int  | 
          $a_id | ) | 
           | 
        
      
 
Definition at line 157 of file TooltipsDBRepository.php.
  160         $this->db->manipulate(
   161             "DELETE FROM help_tooltip WHERE " .
   162             " module_id = " . $this->db->quote($a_id, 
"integer")
  
 
 
◆ getAllTooltips()
      
        
          | ILIAS\Help\Tooltips\TooltipsDBRepository::getAllTooltips  | 
          ( | 
          string  | 
          $a_comp = "",  | 
        
        
           | 
           | 
          int  | 
          $a_module_id = 0  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 77 of file TooltipsDBRepository.php.
References $q.
   81         $q = 
"SELECT * FROM help_tooltip";
    82         $q .= 
" WHERE module_id = " . $this->db->quote($a_module_id, 
"integer");
    84             $q .= 
" AND comp = " . $this->db->quote($a_comp, 
"text");
    86         $set = $this->db->query(
$q);
    88         while ($rec = $this->db->fetchAssoc($set)) {
    89             $tts[$rec[
"id"]] = array(
"id" => $rec[
"id"], 
"text" => $rec[
"tt_text"],
    90                                      "tt_id" => $rec[
"tt_id"]);
 
 
 
 
◆ getTooltipComponents()
      
        
          | ILIAS\Help\Tooltips\TooltipsDBRepository::getTooltipComponents  | 
          ( | 
          int  | 
          $a_module_id = 0 | ) | 
           | 
        
      
 
Get all tooltip components. 
Definition at line 135 of file TooltipsDBRepository.php.
  138         $set = $this->db->query(
"SELECT DISTINCT comp FROM help_tooltip " .
   139             " WHERE module_id = " . $this->db->quote($a_module_id, 
"integer") .
   142         while ($rec = $this->db->fetchAssoc($set)) {
   143             $comps[] = $rec[
"comp"];
  
 
 
◆ getTooltipPresentationText()
      
        
          | ILIAS\Help\Tooltips\TooltipsDBRepository::getTooltipPresentationText  | 
          ( | 
          string  | 
          $a_tt_id,  | 
        
        
           | 
           | 
          array  | 
          $module_ids  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 33 of file TooltipsDBRepository.php.
References $q, and ILIAS\Repository\int().
   37         $set = $this->db->query(
    39             "SELECT tt.tt_text FROM help_tooltip tt LEFT JOIN help_module hmod " .
    40             " ON (tt.module_id = hmod.id) " .
    41             " WHERE tt.tt_id = " . $this->db->quote($a_tt_id, 
"text") .
    42             " AND " . $this->db->in(
"tt.module_id", $module_ids, 
false, 
"integer") .
    43             " ORDER BY hmod.order_nr "    45         $rec = $this->db->fetchAssoc($set);
    46         if (is_array($rec) && $rec[
"tt_text"] != 
"") {
    48             if (count($module_ids) === 1 && current($module_ids) === 0) {
    49                 $t .= 
"<br/><i>(" . $a_tt_id . 
")</i>";
    53             $fu = (
int) strpos($a_tt_id, 
"_");
    54             $gen_tt_id = 
"*" . substr($a_tt_id, $fu);
    55             $set = $this->db->query(
    56                 "SELECT tt.tt_text FROM help_tooltip tt LEFT JOIN help_module hmod " .
    57                 " ON (tt.module_id = hmod.id) " .
    58                 " WHERE tt.tt_id = " . $this->db->quote($gen_tt_id, 
"text") .
    59                 " AND " . $this->db->in(
"tt.module_id", $module_ids, 
false, 
"integer") .
    60                 " ORDER BY hmod.order_nr "    62             $rec = $this->db->fetchAssoc($set);
    63             if (is_array($rec) && $rec[
"tt_text"] != 
"") {
    65                 if (count($module_ids) === 1 && current($module_ids) === 0) {
    66                     $t .= 
"<br/><i>(" . $a_tt_id . 
")</i>";
    71         if (count($module_ids) === 1 && current($module_ids) === 0) {
    72             return "<i>" . $a_tt_id . 
"</i>";
 
 
 
 
◆ updateTooltip()
      
        
          | ILIAS\Help\Tooltips\TooltipsDBRepository::updateTooltip  | 
          ( | 
          int  | 
          $a_id,  | 
        
        
           | 
           | 
          string  | 
          $a_text,  | 
        
        
           | 
           | 
          string  | 
          $a_tt_id  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 114 of file TooltipsDBRepository.php.
  119         $fu = strpos($a_tt_id, 
"_");
   120         $comp = substr($a_tt_id, 0, $fu);
   122         $this->db->manipulate(
   123             "UPDATE help_tooltip SET " .
   124             " tt_text = " . $this->db->quote($a_text, 
"text") . 
", " .
   125             " tt_id = " . $this->db->quote($a_tt_id, 
"text") . 
", " .
   126             " comp = " . $this->db->quote($comp, 
"text") .
   127             " WHERE id = " . $this->db->quote($a_id, 
"integer")
  
 
 
◆ $db
The documentation for this class was generated from the following file: