ILIAS  release_4-4 Revision
class.ilLMGlossaryTableGUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
5 include_once("./Services/Table/classes/class.ilTable2GUI.php");
6 
16 {
20  function __construct($a_lm, $a_parent_obj, $a_parent_cmd)
21  {
22  global $ilCtrl, $lng, $ilAccess, $lng;
23 
24  $this->lm = $a_lm;
25  $this->id = "lm_glo";
26 
27  parent::__construct($a_parent_obj, $a_parent_cmd);
28  $data = array();
29  foreach ($a_lm->getAutoGlossaries() as $glo_id)
30  {
31  $data[] = array("glo_id" => $glo_id, "title" => ilObject::_lookupTitle($glo_id));
32  }
33  $this->setData($data);
34  $this->setTitle($lng->txt("cont_auto_glossaries"));
35 
36  $this->addColumn($this->lng->txt("title"), "title");
37  $this->addColumn($this->lng->txt("actions"));
38 
39  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
40  $this->setRowTemplate("tpl.lm_glossary_row.html", "Modules/LearningModule");
41 
42 // $this->addMultiCommand("", $lng->txt(""));
43 // $this->addCommandButton("", $lng->txt(""));
44  }
45 
49  protected function fillRow($a_set)
50  {
51  global $lng, $ilCtrl;
52 
53  $ilCtrl->setParameter($this->parent_obj, "glo_id", $a_set["glo_id"]);
54  $this->tpl->setCurrentBlock("cmd");
55  $this->tpl->setVariable("CMD_HREF", $ilCtrl->getLinkTarget($this->parent_obj, "removeLMGlossary"));
56  $this->tpl->setVariable("CMD_TXT", $lng->txt("remove"));
57  $this->tpl->parseCurrentBlock();
58 
59  $this->tpl->setVariable("TITLE", ilObject::_lookupTitle($a_set["glo_id"]));
60  }
61 
62 
63 }
64 ?>
fillRow($a_set)
Fill table row.
static _lookupTitle($a_id)
lookup object title
global $ilCtrl
Definition: ilias.php:18
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Class ilTable2GUI.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="")
Add a column to the header.
TableGUI class for glossary tables.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
global $lng
Definition: privfeed.php:40
setFormAction($a_form_action)
Set Form action parameter.
__construct($a_lm, $a_parent_obj, $a_parent_cmd)
Constructor.