ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilLMEditShortTitlesTableGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
14{
18 protected $ctrl;
19
23 protected $lm;
24
28 protected $tpl;
29
33 protected $lng;
34
38 public function __construct($a_parent_obj, $a_parent_cmd, $a_lm, $a_lang)
39 {
40 global $DIC;
41
42 $this->ctrl = $DIC->ctrl();
43 $this->lm = $a_lm;
44 $this->tpl = $DIC["tpl"];
45 $this->lng = $DIC->language();
46 $this->lang = $a_lang;
47
48 $this->setId("lm_short_title");
49
50 parent::__construct($a_parent_obj, $a_parent_cmd);
51 $this->setData(ilLMObject::getShortTitles($this->lm->getId(), $this->lang));
52 $this->setTitle($this->lng->txt("cont_short_titles"));
53
54 $this->addColumn($this->lng->txt("title"));
55 $this->addColumn($this->lng->txt("cont_short_title"));
56
57 $this->setFormAction($this->ctrl->getFormAction($a_parent_obj));
58 $this->setRowTemplate("tpl.short_title_row.html", "Modules/LearningModule");
59
60 $this->addCommandButton("save", $this->lng->txt("save"));
61 //$this->setMaxCount(9999);
62 }
63
67 protected function fillRow($a_set)
68 {
69 $this->tpl->setVariable("TITLE", $a_set["title"]);
70 $this->tpl->setVariable("DEFAULT_TITLE", $a_set["default_title"]);
71 $this->tpl->setVariable("DEFAULT_SHORT_TITLE", $a_set["default_short_title"]);
72 $this->tpl->setVariable("ID", $a_set["obj_id"]);
73 $this->tpl->setVariable("SHORT_TITLE", ilUtil::prepareFormOutput($a_set["short_title"]));
74 }
75}
An exception for terminatinating execution or to throw for unit testing.
TableGUI class for lm short titles.
__construct($a_parent_obj, $a_parent_cmd, $a_lm, $a_lang)
Constructor.
static getShortTitles($a_lm_id, $a_lang="-")
Get short titles.
Class ilTable2GUI.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
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.
setId($a_val)
Set id.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
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 @access public
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46