ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
5include_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?>
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
TableGUI class for skill usages.
fillRow($a_set)
Fill table row.
__construct($a_parent_obj, $a_parent_cmd, $a_cskill_id, $a_usage)
Constructor.
static getTypeInfoString($a_type)
Get type info string.
static getObjTypeString($a_type)
Get type info string.
Class ilTable2GUI.
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.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setEnableNumInfo($a_val)
Set enable num info.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setDescription($a_val)
Set description.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40
$path
Definition: index.php:22