ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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  protected $access;
21 
25  public function __construct($a_lm, $a_parent_obj, $a_parent_cmd)
26  {
27  global $DIC;
28 
29  $this->ctrl = $DIC->ctrl();
30  $this->lng = $DIC->language();
31  $this->access = $DIC->access();
32  $ilCtrl = $DIC->ctrl();
33  $lng = $DIC->language();
34  $ilAccess = $DIC->access();
35  $lng = $DIC->language();
36 
37  $this->lm = $a_lm;
38  $this->id = "lm_glo";
39 
40  parent::__construct($a_parent_obj, $a_parent_cmd);
41  $data = array();
42  foreach ($a_lm->getAutoGlossaries() as $glo_id) {
43  $data[] = array("glo_id" => $glo_id, "title" => ilObject::_lookupTitle($glo_id));
44  }
45  $this->setData($data);
46  $this->setTitle($lng->txt("cont_auto_glossaries"));
47 
48  $this->addColumn($this->lng->txt("title"), "title");
49  $this->addColumn($this->lng->txt("actions"));
50 
51  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
52  $this->setRowTemplate("tpl.lm_glossary_row.html", "Modules/LearningModule");
53 
54  // $this->addMultiCommand("", $lng->txt(""));
55 // $this->addCommandButton("", $lng->txt(""));
56  }
57 
61  protected function fillRow($a_set)
62  {
63  $lng = $this->lng;
65 
66  $ilCtrl->setParameter($this->parent_obj, "glo_id", $a_set["glo_id"]);
67  $this->tpl->setCurrentBlock("cmd");
68  $this->tpl->setVariable("CMD_HREF", $ilCtrl->getLinkTarget($this->parent_obj, "removeLMGlossary"));
69  $this->tpl->setVariable("CMD_TXT", $lng->txt("remove"));
70  $this->tpl->parseCurrentBlock();
71 
72  $this->tpl->setVariable("TITLE", ilObject::_lookupTitle($a_set["glo_id"]));
73  }
74 }
fillRow($a_set)
Fill table row.
global $DIC
Definition: saml.php:7
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.
TableGUI class for glossary tables.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
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.
__construct($a_lm, $a_parent_obj, $a_parent_cmd)
Constructor.