ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilHelpTooltipTableGUI.php
Go to the documentation of this file.
1 <?php
2 
25 {
27 
28  public function __construct(
29  object $a_parent_obj,
30  string $a_parent_cmd,
31  string $a_comp
32  ) {
33  global $DIC;
34 
35  $this->ctrl = $DIC->ctrl();
36  $this->lng = $DIC->language();
37  $this->access = $DIC->access();
38  $ilCtrl = $DIC->ctrl();
39  $lng = $DIC->language();
40  $ttm = $DIC->help()->internal()->domain()->tooltips();
41 
42  $this->setId("lm_help_tooltips");
43 
44  parent::__construct($a_parent_obj, $a_parent_cmd);
45 
46  $this->setData($ttm->getAllTooltips($a_comp));
47 
48  $this->setTitle($lng->txt("help_tooltips"));
49 
50  $this->addColumn("", "", "1px", true);
51  $this->addColumn($this->lng->txt("help_tooltip_id"));
52  $this->addColumn($this->lng->txt("help_tt_text"));
53 
54  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
55  $this->setRowTemplate("tpl.help_tooltip.html", "components/ILIAS/LearningModule");
56  $this->setDefaultOrderField("tt_id");
57  $this->setDefaultOrderDirection("asc");
58 
59  $this->addCommandButton("saveTooltips", $lng->txt("save"));
60  $this->addMultiCommand("deleteTooltips", $lng->txt("delete"));
61  }
62 
63  protected function fillRow(array $a_set): void
64  {
65  $this->tpl->setVariable("ID", $a_set["id"]);
66  $this->tpl->setVariable("TEXT", ilLegacyFormElementsUtil::prepareFormOutput($a_set["text"]));
67  $this->tpl->setVariable("TT_ID", ilLegacyFormElementsUtil::prepareFormOutput($a_set["tt_id"]));
68  }
69 }
setData(array $a_data)
__construct(object $a_parent_obj, string $a_parent_cmd, string $a_comp)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setFormAction(string $a_form_action, bool $a_multipart=false)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static prepareFormOutput($a_str, bool $a_strip=false)
ilLanguage $lng
setId(string $a_val)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
global $DIC
Definition: shib_login.php:26
setDefaultOrderDirection(string $a_defaultorderdirection)
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
__construct(Container $dic, ilPlugin $plugin)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
addMultiCommand(string $a_cmd, string $a_text)