ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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  $ilCtrl->setParameterByClass("ilglossarytermgui", "term_id", $a_set["id"]);
65 
66  $sep = ": ";
67 
68  $this->tpl->setCurrentBlock("definition");
69  $this->tpl->setVariable("SEP", $sep);
70  $ilCtrl->setParameterByClass("ilglossarydefpagegui", "term_id", $a_set["id"]);
71  $this->tpl->setVariable(
72  "LINK_EDIT_DEF",
73  $ilCtrl->getLinkTargetByClass(array("ilglossarytermgui",
74  "iltermdefinitioneditorgui",
75  "ilglossarydefpagegui"), "edit")
76  );
77  $this->tpl->setVariable("TEXT_DEF", $this->lng->txt("glo_definition_abbr"));
78  $this->tpl->parseCurrentBlock();
79  $sep = ", ";
80 
81  $ilCtrl->setParameterByClass(
82  "ilglossarydefpagegui",
83  "term_id",
84  $this->request->getTermId()
85  );
86 
87  if ($a_set["id"] == $this->request->getTermId()) {
88  $this->tpl->touchBlock("hl");
89  }
90 
91  $this->tpl->setVariable("TEXT_TERM", $a_set["term"]);
92  $this->tpl->setVariable(
93  "LINK_EDIT_TERM",
94  $ilCtrl->getLinkTargetByClass("ilglossarytermgui", "editTerm")
95  );
96 
97  $ilCtrl->setParameterByClass(
98  "ilglossarytermgui",
99  "term_id",
100  $this->request->getTermId()
101  );
102  }
103 }
setData(array $a_data)
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...
setFormAction(string $a_form_action, bool $a_multipart=false)
setEnableTitle(bool $a_enabletitle)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS Glossary Editing EditingGUIRequest $request
setParameterByClass(string $a_class, string $a_parameter, $a_value)
__construct(ilGlossaryTermGUI $a_parent_obj, string $a_parent_cmd)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilLanguage $lng
setId(string $a_val)
global $DIC
Definition: feed.php:28
__construct(VocabulariesInterface $vocabularies)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
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="")
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)