ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
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 
5 include_once("./Services/Table/classes/class.ilTable2GUI.php");
6 
16 {
20  function __construct($a_parent_obj, $a_parent_cmd, $a_assigned_object_id)
21  {
22  global $ilCtrl, $lng, $ilAccess, $lng;
23 
24  parent::__construct($a_parent_obj, $a_parent_cmd);
25  $this->assigned_object_id = $a_assigned_object_id;
26 
27  include_once("./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
28  $this->setData(ilObjTaxonomy::getUsageOfObject($this->assigned_object_id, true));
29  $this->setTitle($lng->txt("obj_taxf"));
30 
31  $this->addColumn($this->lng->txt("title"), "title");
32  $this->addColumn($this->lng->txt("actions"));
33 
34  $this->setDefaultOrderField("title");
35  $this->setDefaultOrderDirection("asc");
36 
37  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
38  $this->setRowTemplate("tpl.taxonomy_list_row.html", "Services/Taxonomy");
39 
40  //$this->addMultiCommand("", $lng->txt(""));
41  //$this->addCommandButton("", $lng->txt(""));
42  }
43 
47  protected function fillRow($a_set)
48  {
49  global $lng, $ilCtrl;
50 
51  $ilCtrl->setParameter($this->parent_obj, "tax_id", $a_set["tax_id"]);
52  $this->tpl->setCurrentBlock("cmd");
53  $this->tpl->setVariable("HREF_CMD", $ilCtrl->getLinkTarget($this->parent_obj, "listNodes"));
54  $this->tpl->setVariable("CMD", $lng->txt("edit"));
55  $this->tpl->parseCurrentBlock();
56  $this->tpl->setCurrentBlock("cmd");
57  $this->tpl->setVariable("HREF_CMD", $ilCtrl->getLinkTarget($this->parent_obj, "confirmDeleteTaxonomy"));
58  $this->tpl->setVariable("CMD", $lng->txt("delete"));
59  $this->tpl->parseCurrentBlock();
60  $ilCtrl->setParameter($this->parent_obj, "tax_id", $_GET["tax_id"]);
61 
62  $this->tpl->setVariable("TITLE", $a_set["title"]);
63  }
64 
65 }
66 ?>
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
static getUsageOfObject($a_obj_id, $a_include_titles=false)
Get usage of object.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Class ilTable2GUI.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="")
Add a column to the header.
__construct($a_parent_obj, $a_parent_cmd, $a_assigned_object_id)
Constructor.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
global $lng
Definition: privfeed.php:40
setFormAction($a_form_action)
Set Form action parameter.
TableGUI class for taxonomy list.