ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilSkillProfileTableGUI.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
5include_once("./Services/Table/classes/class.ilTable2GUI.php");
6
16{
20 protected $ctrl;
21
25 protected $access;
26
30 public function __construct($a_parent_obj, $a_parent_cmd, $a_write_permission = false)
31 {
32 global $DIC;
33
34 $this->ctrl = $DIC->ctrl();
35 $this->lng = $DIC->language();
36 $this->access = $DIC->access();
37 $ilCtrl = $DIC->ctrl();
38 $lng = $DIC->language();
39 $ilAccess = $DIC->access();
40 $lng = $DIC->language();
41
42 parent::__construct($a_parent_obj, $a_parent_cmd);
43 $this->setData($this->getProfiles());
44 $this->setTitle($lng->txt("skmg_skill_profiles"));
45
46 $this->addColumn("", "", "1px", true);
47 $this->addColumn($this->lng->txt("title"), "title");
48 $this->addColumn($this->lng->txt("users"));
49 $this->addColumn($this->lng->txt("actions"));
50
51 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
52 $this->setRowTemplate("tpl.skill_profile_row.html", "Services/Skill");
53
54 $this->addMultiCommand("exportProfiles", $lng->txt("export"));
55 if ($a_write_permission) {
56 $this->addMultiCommand("confirmDeleteProfiles", $lng->txt("delete"));
57 }
58 //$this->addCommandButton("", $lng->txt(""));
59 }
60
66 public function getProfiles()
67 {
68 include_once("./Services/Skill/classes/class.ilSkillProfile.php");
70 }
71
72
76 protected function fillRow($a_set)
77 {
80
81 $this->tpl->setCurrentBlock("cmd");
82 $this->tpl->setVariable("CMD", $lng->txt("edit"));
83 $ilCtrl->setParameter($this->parent_obj, "sprof_id", $a_set["id"]);
84 $this->tpl->setVariable("CMD_HREF", $ilCtrl->getLinkTarget($this->parent_obj, "showUsers"));
85 $ilCtrl->setParameter($this->parent_obj, "sprof_id", $_GET["sprof_id"]);
86 $this->tpl->parseCurrentBlock();
87
88 $this->tpl->setVariable("ID", $a_set["id"]);
89 $this->tpl->setVariable("TITLE", $a_set["title"]);
90 $this->tpl->setVariable("NUM_USERS", ilSkillProfile::countUsers($a_set["id"]));
91 }
92}
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
TableGUI class for skill profiles.
__construct($a_parent_obj, $a_parent_cmd, $a_write_permission=false)
Constructor.
static countUsers($a_profile_id)
Get assigned users.
static getProfiles()
Get profiles.
Class ilTable2GUI.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
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.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
global $ilCtrl
Definition: ilias.php:18
global $DIC
Definition: saml.php:7