ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilTrashTableGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("./Services/Table/classes/class.ilTable2GUI.php");
5 
15 {
16 
20  function __construct($a_parent_obj, $a_parent_cmd)
21  {
22  global $ilCtrl, $lng, $ilAccess, $lng;
23 
24  $this->ref_id = $a_ref_id;
25 
26  parent::__construct($a_parent_obj, $a_parent_cmd);
27  //$this->setTitle($lng->txt(""));
28 
29  $this->addColumn($this->lng->txt(""), "", "1", 1);
30  $this->addColumn($this->lng->txt("type"), "", "1");
31  $this->addColumn($this->lng->txt("title"), "title");
32  $this->addColumn($this->lng->txt("last_change"), "last_update");
33  $this->setDefaultOrderField("title");
34  $this->setDefaultOrderDirection("asc");
35 
36 
37  $this->setEnableHeader(true);
38  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
39  $this->setRowTemplate("tpl.trash_list_row.html", "Services/Repository");
40  //$this->disable("footer");
41  $this->setEnableTitle(true);
42  $this->setSelectAllCheckbox("trash_id[]");
43 
44 
45  $this->addMultiCommand("removeFromSystem", $lng->txt("btn_remove_system"));
46  $this->addMultiCommand("undelete", $lng->txt("btn_undelete"));
47  }
48 
52  protected function fillRow($a_set)
53  {
54  global $lng, $objDefinition;
55 
56  $img = ilObject::_getIcon($obj_id, "small", $a_set["type"]);
57  if (is_file($img))
58  {
59  $alt = ($objDefinition->isPlugin($a_set["type"]))
60  ? $lng->txt("icon")." ".ilPlugin::lookupTxt("rep_robj", $a_set["type"], "obj_".$a_set["type"])
61  : $lng->txt("icon")." ".$lng->txt("obj_".$a_set["type"]);
62 
63  $this->tpl->setVariable("IMG_TYPE", ilUtil::img($img, $alt));
64  }
65  $this->tpl->setVariable("ID", $a_set["ref_id"]);
66  $this->tpl->setVariable("VAL_TITLE", $a_set["title"]);
67  $this->tpl->setVariable("VAL_LAST_CHANGE", $a_set["last_update"]);
68  }
69 
70 }
71 ?>