ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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,
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", "components/ILIAS/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}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(object $a_parent_obj, string $a_parent_cmd, ilObjLearningModule $a_lm, string $a_lang)
fillRow(array $a_set)
Standard Version of Fill Row.
static getShortTitles(int $a_lm_id, string $a_lang="-")
static prepareFormOutput($a_str, bool $a_strip=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setFormAction(string $a_form_action, bool $a_multipart=false)
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)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setId(string $a_val)
setData(array $a_data)
Set table data.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26