ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilHelpTooltipTableGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("./Services/Table/classes/class.ilTable2GUI.php");
5 include_once("./Services/Help/classes/class.ilHelpMapping.php");
6 
7 
17 {
21  protected $access;
22 
23 
27  public function __construct($a_parent_obj, $a_parent_cmd, $a_comp)
28  {
29  global $DIC;
30 
31  $this->ctrl = $DIC->ctrl();
32  $this->lng = $DIC->language();
33  $this->access = $DIC->access();
34  $ilCtrl = $DIC->ctrl();
35  $lng = $DIC->language();
36  $ilAccess = $DIC->access();
37  $lng = $DIC->language();
38 
39  $this->setId("lm_help_tooltips");
40 
41  parent::__construct($a_parent_obj, $a_parent_cmd);
42 
43  include_once("./Services/Help/classes/class.ilHelp.php");
44  $this->setData(ilHelp::getAllTooltips($a_comp));
45 
46  $this->setTitle($lng->txt("help_tooltips"));
47 
48  $this->addColumn("", "", "1px", true);
49  $this->addColumn($this->lng->txt("help_tooltip_id"));
50  $this->addColumn($this->lng->txt("help_tt_text"));
51 
52  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
53  $this->setRowTemplate("tpl.help_tooltip.html", "Modules/LearningModule");
54  $this->setDefaultOrderField("tt_id");
55  $this->setDefaultOrderDirection("asc");
56 
57  $this->addCommandButton("saveTooltips", $lng->txt("save"));
58  $this->addMultiCommand("deleteTooltips", $lng->txt("delete"));
59  }
60 
64  protected function fillRow($a_set)
65  {
66  $lng = $this->lng;
67 
68  $this->tpl->setVariable("ID", $a_set["id"]);
69  $this->tpl->setVariable("TEXT", ilUtil::prepareFormOutput($a_set["text"]));
70  $this->tpl->setVariable("TT_ID", ilUtil::prepareFormOutput($a_set["tt_id"]));
71  }
72 }
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
global $DIC
Definition: saml.php:7
__construct($a_parent_obj, $a_parent_cmd, $a_comp)
Constructor.
setId($a_val)
Set id.
global $ilCtrl
Definition: ilias.php:18
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
static getAllTooltips($a_comp="", $a_module_id=0)
Get all tooltips.
Class ilTable2GUI.
addMultiCommand($a_cmd, $a_text)
Add Command button.
fillRow($a_set)
Fill table row.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.