ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilTermQuickListTableGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("./Services/Table/classes/class.ilTable2GUI.php");
5 
15 {
19  protected $access;
20 
21 
25  public function __construct($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->glossary = $a_parent_obj->glossary;
38  $this->setId("gloqtl" . $this->glossary->getId());
39 
40  parent::__construct($a_parent_obj, $a_parent_cmd);
41  $this->setTitle($lng->txt("cont_terms"));
42 
43  $this->addColumn("", "");
44  $this->setEnableHeader(false);
45  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
46  $this->setRowTemplate("tpl.term_quick_list_row.html", "Modules/Glossary");
47  $this->setEnableTitle(false);
48 
49  //$this->setData($this->glossary->getTermList($this->filter["term"], "",
50  // $this->filter["definition"]));
51  $this->setData($this->glossary->getTermList("", "", "", 0, false, false, null, true));
52  }
53 
57  protected function fillRow($term)
58  {
59  $lng = $this->lng;
61 
62  $defs = ilGlossaryDefinition::getDefinitionList($term["id"]);
63  $ilCtrl->setParameterByClass("ilglossarytermgui", "term_id", $term["id"]);
64 
65  $sep = ": ";
66  for ($j = 0; $j < count($defs); $j++) {
67  $def = $defs[$j];
68 
69  $this->tpl->setCurrentBlock("definition");
70  $this->tpl->setVariable("SEP", $sep);
71  $ilCtrl->setParameterByClass("ilglossarydefpagegui", "def", $def["id"]);
72  $this->tpl->setVariable(
73  "LINK_EDIT_DEF",
74  $ilCtrl->getLinkTargetByClass(array("ilglossarytermgui",
75  "iltermdefinitioneditorgui",
76  "ilglossarydefpagegui"), "edit")
77  );
78  $this->tpl->setVariable("TEXT_DEF", $this->lng->txt("glo_definition_abbr") . ($j + 1));
79  $this->tpl->parseCurrentBlock();
80  $sep = ", ";
81  }
82  $ilCtrl->setParameterByClass("ilglossarydefpagegui", "def", $_GET["def"]);
83 
84  if ($term["id"] == $_GET["term_id"]) {
85  $this->tpl->touchBlock("hl");
86  }
87 
88  $this->tpl->setVariable("TEXT_TERM", $term["term"]);
89  $this->tpl->setVariable(
90  "LINK_EDIT_TERM",
91  $ilCtrl->getLinkTargetByClass("ilglossarytermgui", "editTerm")
92  );
93 
94  $ilCtrl->setParameterByClass("ilglossarytermgui", "term_id", $_GET["term_id"]);
95  }
96 }
static getDefinitionList($a_term_id)
static
global $DIC
Definition: saml.php:7
$_GET["client_id"]
setId($a_val)
Set id.
global $ilCtrl
Definition: ilias.php:18
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Class ilTable2GUI.
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
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.
$def
Definition: croninfo.php:21
setEnableHeader($a_enableheader)
Set Enable Header.
setEnableTitle($a_enabletitle)
Set Enable Title.