ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilLMGlossaryTableGUI.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
14{
18 protected $access;
19
23 public function __construct($a_lm, $a_parent_obj, $a_parent_cmd)
24 {
25 global $DIC;
26
27 $this->ctrl = $DIC->ctrl();
28 $this->lng = $DIC->language();
29 $this->access = $DIC->access();
30 $ilCtrl = $DIC->ctrl();
31 $lng = $DIC->language();
32 $ilAccess = $DIC->access();
33 $lng = $DIC->language();
34
35 $this->lm = $a_lm;
36 $this->id = "lm_glo";
37
38 parent::__construct($a_parent_obj, $a_parent_cmd);
39 $data = array();
40 foreach ($a_lm->getAutoGlossaries() as $glo_id) {
41 $data[] = array("glo_id" => $glo_id, "title" => ilObject::_lookupTitle($glo_id));
42 }
43 $this->setData($data);
44 $this->setTitle($lng->txt("cont_auto_glossaries"));
45
46 $this->addColumn($this->lng->txt("title"), "title");
47 $this->addColumn($this->lng->txt("actions"));
48
49 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
50 $this->setRowTemplate("tpl.lm_glossary_row.html", "Modules/LearningModule");
51
52 // $this->addMultiCommand("", $lng->txt(""));
53// $this->addCommandButton("", $lng->txt(""));
54 }
55
59 protected function fillRow($a_set)
60 {
63
64 $ilCtrl->setParameter($this->parent_obj, "glo_id", $a_set["glo_id"]);
65 $this->tpl->setCurrentBlock("cmd");
66 $this->tpl->setVariable("CMD_HREF", $ilCtrl->getLinkTarget($this->parent_obj, "removeLMGlossary"));
67 $this->tpl->setVariable("CMD_TXT", $lng->txt("remove"));
68 $this->tpl->parseCurrentBlock();
69
70 $this->tpl->setVariable("TITLE", ilObject::_lookupTitle($a_set["glo_id"]));
71 }
72}
An exception for terminatinating execution or to throw for unit testing.
TableGUI class for glossary tables.
fillRow($a_set)
Fill table row.
__construct($a_lm, $a_parent_obj, $a_parent_cmd)
Constructor.
static _lookupTitle($a_id)
lookup object title
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.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
global $ilCtrl
Definition: ilias.php:18
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46