ILIAS  release_8 Revision v8.24
class.ilTermQuickListTableGUI.php
Go to the documentation of this file.
1<?php
2
25{
27 protected \ILIAS\Glossary\Editing\EditingGUIRequest $request;
29
30 public function __construct(
31 ilGlossaryTermGUI $a_parent_obj,
32 string $a_parent_cmd
33 ) {
34 global $DIC;
35
36 $this->ctrl = $DIC->ctrl();
37 $this->lng = $DIC->language();
38 $this->access = $DIC->access();
39 $ilCtrl = $DIC->ctrl();
40 $lng = $DIC->language();
41 $this->request = $DIC->glossary()
42 ->internal()
43 ->gui()
44 ->editing()
45 ->request();
46
47 $this->glossary = $a_parent_obj->glossary;
48 $this->setId("gloqtl" . $this->glossary->getId());
49
50 parent::__construct($a_parent_obj, $a_parent_cmd);
51 $this->setTitle($lng->txt("cont_terms"));
52 $this->addColumn("", "");
53 $this->setEnableHeader(false);
54 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
55 $this->setRowTemplate("tpl.term_quick_list_row.html", "Modules/Glossary");
56 $this->setEnableTitle(false);
57 $this->setData($this->glossary->getTermList("", "", "", 0, false, false, null, true));
58 }
59
60 protected function fillRow(array $a_set): void
61 {
62 $ilCtrl = $this->ctrl;
63
64 $defs = ilGlossaryDefinition::getDefinitionList($a_set["id"]);
65 $ilCtrl->setParameterByClass("ilglossarytermgui", "term_id", $a_set["id"]);
66
67 $sep = ": ";
68 for ($j = 0, $jMax = count($defs); $j < $jMax; $j++) {
69 $def = $defs[$j];
70
71 $this->tpl->setCurrentBlock("definition");
72 $this->tpl->setVariable("SEP", $sep);
73 $ilCtrl->setParameterByClass("ilglossarydefpagegui", "def", $def["id"]);
74 $this->tpl->setVariable(
75 "LINK_EDIT_DEF",
76 $ilCtrl->getLinkTargetByClass(array("ilglossarytermgui",
77 "iltermdefinitioneditorgui",
78 "ilglossarydefpagegui"), "edit")
79 );
80 $this->tpl->setVariable("TEXT_DEF", $this->lng->txt("glo_definition_abbr") . ($j + 1));
81 $this->tpl->parseCurrentBlock();
82 $sep = ", ";
83 }
84 $ilCtrl->setParameterByClass(
85 "ilglossarydefpagegui",
86 "def",
87 $this->request->getDefinitionId()
88 );
89
90 if ($a_set["id"] == $this->request->getTermId()) {
91 $this->tpl->touchBlock("hl");
92 }
93
94 $this->tpl->setVariable("TEXT_TERM", $a_set["term"]);
95 $this->tpl->setVariable(
96 "LINK_EDIT_TERM",
97 $ilCtrl->getLinkTargetByClass("ilglossarytermgui", "editTerm")
98 );
99
100 $ilCtrl->setParameterByClass(
101 "ilglossarytermgui",
102 "term_id",
103 $this->request->getTermId()
104 );
105 }
106}
static getDefinitionList(int $a_term_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
setEnableTitle(bool $a_enabletitle)
setFormAction(string $a_form_action, bool $a_multipart=false)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
setEnableHeader(bool $a_enableheader)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setId(string $a_val)
setData(array $a_data)
Set table data.
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilGlossaryTermGUI $a_parent_obj, string $a_parent_cmd)
ILIAS Glossary Editing EditingGUIRequest $request
fillRow(array $a_set)
Standard Version of Fill Row.
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc