ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLMGlossaryTableGUI.php
Go to the documentation of this file.
1<?php
2
25{
28
29 public function __construct(
31 object $a_parent_obj,
32 string $a_parent_cmd
33 ) {
34 global $DIC;
35
36 $this->ctrl = $DIC->ctrl();
37 $this->lng = $DIC->language();
38 $this->access = $DIC->access();
39 $ilCtrl = $DIC->ctrl();
40 $lng = $DIC->language();
41
42 $this->lm = $a_lm;
43 $this->id = "lm_glo";
44
45 parent::__construct($a_parent_obj, $a_parent_cmd);
46 $data = array();
47 foreach ($a_lm->getAutoGlossaries() as $glo_id) {
48 $data[] = array("glo_id" => $glo_id, "title" => ilObject::_lookupTitle($glo_id));
49 }
50 $this->setData($data);
51 $this->setTitle($lng->txt("cont_auto_glossaries"));
52
53 $this->addColumn($this->lng->txt("title"), "title");
54 $this->addColumn($this->lng->txt("actions"));
55
56 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
57 $this->setRowTemplate("tpl.lm_glossary_row.html", "components/ILIAS/LearningModule");
58 }
59
60 protected function fillRow(array $a_set): void
61 {
63 $ilCtrl = $this->ctrl;
64
65 $ilCtrl->setParameter($this->parent_obj, "glo_id", $a_set["glo_id"]);
66 $this->tpl->setCurrentBlock("cmd");
67 $this->tpl->setVariable("CMD_HREF", $ilCtrl->getLinkTarget($this->parent_obj, "removeLMGlossary"));
68 $this->tpl->setVariable("CMD_TXT", $lng->txt("remove"));
69 $this->tpl->parseCurrentBlock();
70
71 $this->tpl->setVariable("TITLE", ilObject::_lookupTitle($a_set["glo_id"]));
72 }
73}
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilObjLearningModule $a_lm, object $a_parent_obj, string $a_parent_cmd)
fillRow(array $a_set)
Standard Version of Fill Row.
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $obj_id)
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="")
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.
setData(array $a_data)
Set table data.
ilLanguage $lng
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26