ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilConfirmationTableGUI.php
Go to the documentation of this file.
1 <?php
2 
27 {
29  protected bool $use_icons;
30 
31  public function __construct(bool $a_use_icons)
32  {
34  global $DIC;
35 
36  $this->ctrl = $DIC->ctrl();
37  $this->lng = $DIC->language();
38  $this->access = $DIC->access();
39  $lng = $DIC->language();
40 
41  $this->use_icons = $a_use_icons;
42 
44  $this->setTitle($lng->txt(""));
45  $this->setLimit(9999);
46 
47  if ($this->use_icons) {
48  $this->addColumn($this->lng->txt("type"), "", "1");
49  }
50  $this->addColumn($this->lng->txt("title"));
51 
52  $this->setEnableHeader(true);
53  $this->setRowTemplate("tpl.confirmation_row.html", "components/ILIAS/Utilities");
54  $this->disable("footer");
55  $this->setEnableTitle(true);
56  }
57 
58  protected function fillRow(array $a_set): void
59  {
60  if ($this->use_icons) {
61  if ($a_set["img"] != "") {
62  $this->tpl->setCurrentBlock("img_cell");
63  $this->tpl->setVariable("IMG_ITEM", $a_set["img"]);
64  $this->tpl->setVariable("ALT_ITEM", $a_set["alt"]);
65  $this->tpl->parseCurrentBlock();
66  } else {
67  $this->tpl->touchBlock("blank_cell");
68  }
69  }
70  $this->tpl->setVariable("TXT_ITEM", $a_set["text"]);
71  if (isset($a_set['var']) && $a_set['var']) {
72  $this->tpl->setVariable('VAR_ITEM', $a_set['var']);
73  $this->tpl->setVariable('ID', $a_set['id']);
74  }
75  }
76 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
setEnableTitle(bool $a_enabletitle)
ilLanguage $lng
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
global $DIC
Definition: shib_login.php:26
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
__construct(Container $dic, ilPlugin $plugin)
setLimit(int $a_limit=0, int $a_default_limit=0)
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)
disable(string $a_module_name)
__construct(?object $a_parent_obj, string $a_parent_cmd="", string $a_template_context="")
setEnableHeader(bool $a_enableheader)