ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilTaxonomyListTableGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2011 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/Table/classes/class.ilTable2GUI.php");
6
16{
20 protected $access;
21
25 public function __construct($a_parent_obj, $a_parent_cmd, $a_assigned_object_id, $a_info = null)
26 {
27 global $DIC;
28
29 $this->ctrl = $DIC->ctrl();
30 $this->lng = $DIC->language();
31 $this->access = $DIC->access();
32 $ilCtrl = $DIC->ctrl();
33 $lng = $DIC->language();
34 $ilAccess = $DIC->access();
35 $lng = $DIC->language();
36
37 parent::__construct($a_parent_obj, $a_parent_cmd);
38 $this->assigned_object_id = $a_assigned_object_id;
39
40 include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
41 $this->setData(ilObjTaxonomy::getUsageOfObject($this->assigned_object_id, true));
42 $this->setTitle($lng->txt("obj_taxf"));
43 $this->setDescription($a_info);
44
45 $this->addColumn($this->lng->txt("title"), "title");
46 $this->addColumn($this->lng->txt("description"));
47 $this->addColumn($this->lng->txt("actions"));
48
49 $this->setDefaultOrderField("title");
50 $this->setDefaultOrderDirection("asc");
51
52 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
53 $this->setRowTemplate("tpl.taxonomy_list_row.html", "Services/Taxonomy");
54
55 //$this->addMultiCommand("", $lng->txt(""));
56 //$this->addCommandButton("", $lng->txt(""));
57 }
58
62 protected function fillRow($a_set)
63 {
65 $ilCtrl = $this->ctrl;
66
67 $ilCtrl->setParameter($this->parent_obj, "tax_id", $a_set["tax_id"]);
68 $this->tpl->setCurrentBlock("cmd");
69 $this->tpl->setVariable("HREF_CMD", $ilCtrl->getLinkTarget($this->parent_obj, "listNodes"));
70 $this->tpl->setVariable("CMD", $lng->txt("edit"));
71 $this->tpl->parseCurrentBlock();
72 $this->tpl->setCurrentBlock("cmd");
73 $this->tpl->setVariable("HREF_CMD", $ilCtrl->getLinkTarget($this->parent_obj, "confirmDeleteTaxonomy"));
74 $this->tpl->setVariable("CMD", $lng->txt("delete"));
75 $this->tpl->parseCurrentBlock();
76 $ilCtrl->setParameter($this->parent_obj, "tax_id", $_GET["tax_id"]);
77
78 $this->tpl->setVariable("TITLE", $a_set["title"]);
79 $this->tpl->setVariable("DESCRIPTION", ilObject::_lookupDescription($a_set["tax_id"]));
80 }
81}
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
static _lookupDescription($a_id)
lookup object description
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.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
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.
setDescription($a_val)
Set description.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
TableGUI class for taxonomy list.
__construct($a_parent_obj, $a_parent_cmd, $a_assigned_object_id, $a_info=null)
Constructor.
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc