ILIAS  release_8 Revision v8.24
class.ilGlossaryAutoLinkTableGUI.php
Go to the documentation of this file.
1<?php
2
24{
26
27 public function __construct(
28 ilObjGlossary $a_glossary,
29 object $a_parent_obj,
30 string $a_parent_cmd
31 ) {
32 global $DIC;
33
34 $this->glossary = $a_glossary;
35 $this->id = "glo_glo";
36 $this->lng = $DIC->language();
37 $this->ctrl = $DIC->ctrl();
38
39 parent::__construct($a_parent_obj, $a_parent_cmd);
40 $data = array();
41 foreach ($a_glossary->getAutoGlossaries() as $glo_id) {
42 $data[] = array("glo_id" => $glo_id, "title" => ilObject::_lookupTitle($glo_id));
43 }
44 $this->setData($data);
45 $this->setTitle($this->lng->txt("cont_auto_glossaries"));
46
47 $this->addColumn($this->lng->txt("title"), "title");
48 $this->addColumn($this->lng->txt("actions"));
49
50 $this->setFormAction($this->ctrl->getFormAction($a_parent_obj));
51 $this->setRowTemplate("tpl.glo_glossary_auto_link_row.html", "Modules/Glossary");
52 }
53
54 protected function fillRow(array $a_set): void
55 {
56 $this->ctrl->setParameter($this->parent_obj, "glo_id", $a_set["glo_id"]);
57 $this->tpl->setCurrentBlock("cmd");
58 $this->tpl->setVariable("CMD_HREF", $this->ctrl->getLinkTarget($this->parent_obj, "removeGlossary"));
59 $this->tpl->setVariable("CMD_TXT", $this->lng->txt("remove"));
60 $this->tpl->parseCurrentBlock();
61 $this->tpl->setVariable("TITLE", ilObject::_lookupTitle($a_set["glo_id"]));
62 }
63}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
fillRow(array $a_set)
Standard Version of Fill Row.
__construct(ilObjGlossary $a_glossary, object $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...
static _lookupTitle(int $obj_id)
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="")
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)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setData(array $a_data)
Set table data.
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc