ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilTermQuickListTableGUI.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
11{
15 protected $access;
16
17
21 public function __construct($a_parent_obj, $a_parent_cmd)
22 {
23 global $DIC;
24
25 $this->ctrl = $DIC->ctrl();
26 $this->lng = $DIC->language();
27 $this->access = $DIC->access();
28 $ilCtrl = $DIC->ctrl();
29 $lng = $DIC->language();
30 $ilAccess = $DIC->access();
31 $lng = $DIC->language();
32
33 $this->glossary = $a_parent_obj->glossary;
34 $this->setId("gloqtl" . $this->glossary->getId());
35
36 parent::__construct($a_parent_obj, $a_parent_cmd);
37 $this->setTitle($lng->txt("cont_terms"));
38
39 $this->addColumn("", "");
40 $this->setEnableHeader(false);
41 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
42 $this->setRowTemplate("tpl.term_quick_list_row.html", "Modules/Glossary");
43 $this->setEnableTitle(false);
44
45 //$this->setData($this->glossary->getTermList($this->filter["term"], "",
46 // $this->filter["definition"]));
47 $this->setData($this->glossary->getTermList("", "", "", 0, false, false, null, true));
48 }
49
53 protected function fillRow($term)
54 {
57
58 $defs = ilGlossaryDefinition::getDefinitionList($term["id"]);
59 $ilCtrl->setParameterByClass("ilglossarytermgui", "term_id", $term["id"]);
60
61 $sep = ": ";
62 for ($j = 0; $j < count($defs); $j++) {
63 $def = $defs[$j];
64
65 $this->tpl->setCurrentBlock("definition");
66 $this->tpl->setVariable("SEP", $sep);
67 $ilCtrl->setParameterByClass("ilglossarydefpagegui", "def", $def["id"]);
68 $this->tpl->setVariable(
69 "LINK_EDIT_DEF",
70 $ilCtrl->getLinkTargetByClass(array("ilglossarytermgui",
71 "iltermdefinitioneditorgui",
72 "ilglossarydefpagegui"), "edit")
73 );
74 $this->tpl->setVariable("TEXT_DEF", $this->lng->txt("glo_definition_abbr") . ($j + 1));
75 $this->tpl->parseCurrentBlock();
76 $sep = ", ";
77 }
78 $ilCtrl->setParameterByClass("ilglossarydefpagegui", "def", $_GET["def"]);
79
80 if ($term["id"] == $_GET["term_id"]) {
81 $this->tpl->touchBlock("hl");
82 }
83
84 $this->tpl->setVariable("TEXT_TERM", $term["term"]);
85 $this->tpl->setVariable(
86 "LINK_EDIT_TERM",
87 $ilCtrl->getLinkTargetByClass("ilglossarytermgui", "editTerm")
88 );
89
90 $ilCtrl->setParameterByClass("ilglossarytermgui", "term_id", $_GET["term_id"]);
91 }
92}
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
static getDefinitionList($a_term_id)
static
Class ilTable2GUI.
setEnableHeader($a_enableheader)
Set Enable Header.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setEnableTitle($a_enabletitle)
Set Enable Title.
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.
setId($a_val)
Set id.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
global $ilCtrl
Definition: ilias.php:18
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46