ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilLMEditShortTitlesTableGUI.php
Go to the documentation of this file.
1 <?php
2 
24 {
25  protected string $lang;
27 
28  public function __construct(
29  object $a_parent_obj,
30  string $a_parent_cmd,
31  ilObjLearningModule $a_lm,
32  string $a_lang
33  ) {
34  global $DIC;
35 
36  $this->ctrl = $DIC->ctrl();
37  $this->lm = $a_lm;
38  $this->tpl = $DIC["tpl"];
39  $this->lng = $DIC->language();
40  $this->lang = $a_lang;
41 
42  $this->setId("lm_short_title");
43 
44  parent::__construct($a_parent_obj, $a_parent_cmd);
45  $this->setData(ilLMObject::getShortTitles($this->lm->getId(), $this->lang));
46  $this->setTitle($this->lng->txt("cont_short_titles"));
47 
48  $this->addColumn($this->lng->txt("title"));
49  $this->addColumn($this->lng->txt("cont_short_title"));
50 
51  $this->setFormAction($this->ctrl->getFormAction($a_parent_obj));
52  $this->setRowTemplate("tpl.short_title_row.html", "Modules/LearningModule");
53 
54  $this->addCommandButton("save", $this->lng->txt("save"));
55  }
56 
57  protected function fillRow(array $a_set): void
58  {
59  $this->tpl->setVariable("TITLE", $a_set["title"]);
60  $this->tpl->setVariable("DEFAULT_TITLE", $a_set["default_title"] ?? "");
61  $this->tpl->setVariable("DEFAULT_SHORT_TITLE", $a_set["default_short_title"] ?? "");
62  $this->tpl->setVariable("ID", $a_set["obj_id"]);
63  $this->tpl->setVariable("SHORT_TITLE", ilLegacyFormElementsUtil::prepareFormOutput($a_set["short_title"]));
64  }
65 }
setData(array $a_data)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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="")
static prepareFormOutput($a_str, bool $a_strip=false)
__construct(object $a_parent_obj, string $a_parent_cmd, ilObjLearningModule $a_lm, string $a_lang)
setId(string $a_val)
global $DIC
Definition: feed.php:28
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
static getShortTitles(int $a_lm_id, string $a_lang="-")
__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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...