ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilGlossaryAutoLinkTableGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/Table/classes/class.ilTable2GUI.php");
6
16{
20 protected $glossary;
21
25 protected $ctrl;
26
30 protected $lng;
31
32
36 public function __construct(ilObjGlossary $a_glossary, $a_parent_obj, $a_parent_cmd)
37 {
38 global $DIC;
39
40 $this->glossary = $a_glossary;
41 $this->id = "glo_glo";
42 $this->lng = $DIC->language();
43 $this->ctrl = $DIC->ctrl();
44
45 parent::__construct($a_parent_obj, $a_parent_cmd);
46 $data = array();
47 foreach ($a_glossary->getAutoGlossaries() as $glo_id) {
48 $data[] = array("glo_id" => $glo_id, "title" => ilObject::_lookupTitle($glo_id));
49 }
50 $this->setData($data);
51 $this->setTitle($this->lng->txt("cont_auto_glossaries"));
52
53 $this->addColumn($this->lng->txt("title"), "title");
54 $this->addColumn($this->lng->txt("actions"));
55
56 $this->setFormAction($this->ctrl->getFormAction($a_parent_obj));
57 $this->setRowTemplate("tpl.glo_glossary_auto_link_row.html", "Modules/Glossary");
58
59 // $this->addMultiCommand("", $lng->txt(""));
60// $this->addCommandButton("", $lng->txt(""));
61 }
62
66 protected function fillRow($a_set)
67 {
68 $this->ctrl->setParameter($this->parent_obj, "glo_id", $a_set["glo_id"]);
69 $this->tpl->setCurrentBlock("cmd");
70 $this->tpl->setVariable("CMD_HREF", $this->ctrl->getLinkTarget($this->parent_obj, "removeGlossary"));
71 $this->tpl->setVariable("CMD_TXT", $this->lng->txt("remove"));
72 $this->tpl->parseCurrentBlock();
73 $this->tpl->setVariable("TITLE", ilObject::_lookupTitle($a_set["glo_id"]));
74 }
75}
An exception for terminatinating execution or to throw for unit testing.
TableGUI class for auto link glossaries.
__construct(ilObjGlossary $a_glossary, $a_parent_obj, $a_parent_cmd)
Constructor.
Class ilObjGlossary.
getAutoGlossaries()
Get auto glossaries.
static _lookupTitle($a_id)
lookup object title
Class ilTable2GUI.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
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.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
global $DIC
Definition: saml.php:7