ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilSkillLevelResourcesTableGUI.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_skill_id, $a_tref_id,
21  $a_level_id)
22  {
23  global $ilCtrl, $lng, $ilAccess, $lng;
24 
25  $this->level_id = $a_level_id;
26 
27  include_once("./Services/Skill/classes/class.ilSkillResources.php");
28  $this->resources = new ilSkillResources($a_skill_id, $a_tref_id);
29 
30  parent::__construct($a_parent_obj, $a_parent_cmd);
31  $this->setData($this->resources->getResourcesOfLevel($a_level_id));
32  $this->setTitle($lng->txt("resources"));
33 
34  $this->addColumn("", "", "1px", true);
35  $this->addColumn($this->lng->txt("type"), "", "1px");
36  $this->addColumn($this->lng->txt("title"), "");
37  $this->addColumn($this->lng->txt("path"));
38 
39  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
40  $this->setRowTemplate("tpl.level_resources_row.html", "Services/Skill");
41 
42  $this->addMultiCommand("confirmLevelResourcesRemoval", $lng->txt("remove"));
43  //$this->addCommandButton("", $lng->txt(""));
44  }
45 
49  protected function fillRow($a_set)
50  {
51  global $lng, $tree;
52 
53  $ref_id = $a_set["rep_ref_id"];
55 
56  $this->tpl->setVariable("TITLE", ilObject::_lookupTitle($obj_id));
57  $this->tpl->setVariable("IMG", ilUtil::img(ilObject::_getIcon($obj_id, "tiny")));
58  $this->tpl->setVariable("ID", $ref_id);
59 
60  $path = $tree->getPathFull($ref_id);
61  $path_items = array();
62  foreach ($path as $p)
63  {
64  if ($p["type"] != "root" && $p["child"] != $ref_id)
65  {
66  $path_items[] = $p["title"];
67  }
68  }
69  $this->tpl->setVariable("PATH", implode($path_items, " > "));
70  }
71 
72 }
73 ?>