ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.ilSkillUsageTableGUI.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 
5 include_once("./Services/Table/classes/class.ilTable2GUI.php");
6 
16 {
17 
21  function __construct($a_parent_obj, $a_parent_cmd, $a_cskill_id, $a_usage)
22  {
23  global $ilCtrl, $lng, $ilAccess, $lng;
24 
25  $id_parts = explode(":", $a_cskill_id);
26  $this->skill_id = $id_parts[0];
27  $this->tref_id = $id_parts[1];
28 
29  $data = array();
30  foreach ($a_usage as $k => $v)
31  {
32  $data[] = array("type" => $k, "usages" => $v);
33  }
34 
35  parent::__construct($a_parent_obj, $a_parent_cmd);
36  $this->setData($data);
37  $this->setTitle(ilSkillTreeNode::_lookupTitle($this->skill_id, $this->tref_id));
38 
39  include_once("./Services/Skill/classes/class.ilSkillTree.php");
40  $tree = new ilSkillTree();
41  $path = $tree->getSkillTreePathAsString($this->skill_id, $this->tref_id);
42  $this->setDescription($path);
43 
44  $this->addColumn($this->lng->txt("skmg_type"), "", "50%");
45  $this->addColumn($this->lng->txt("skmg_number"), "", "50%");
46 
47  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
48  $this->setRowTemplate("tpl.skill_usage_row.html", "Services/Skill");
49  $this->setEnableNumInfo(false);
50 
51 // $this->addMultiCommand("", $lng->txt(""));
52 // $this->addCommandButton("", $lng->txt(""));
53  }
54 
55 
59  protected function fillRow($a_set)
60  {
61  global $lng;
62 //var_dump($a_set);
63  $this->tpl->setVariable("TYPE_INFO", ilSkillUsage::getTypeInfoString($a_set["type"]));
64  $this->tpl->setVariable("NUMBER", count($a_set["usages"]));
65  $this->tpl->setVariable("OBJ_TYPE", ilSkillUsage::getObjTypeString($a_set["type"]));
66  }
67 
68 }
69 ?>
setDescription($a_val)
Set description.
$path
Definition: aliased.php:25
Skill tree.
setEnableNumInfo($a_val)
Set enable num info.
fillRow($a_set)
Fill table row.
static getObjTypeString($a_type)
Get type info string.
__construct($a_parent_obj, $a_parent_cmd, $a_cskill_id, $a_usage)
Constructor.
global $ilCtrl
Definition: ilias.php:18
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Class ilTable2GUI.
static getTypeInfoString($a_type)
Get type info string.
TableGUI class for skill usages.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
Create styles array
The data for the language used.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
global $lng
Definition: privfeed.php:17
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.