ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilSkillProfileUserTableGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2020 ILIAS open source, Extended GPL, see docs/LICENSE */
4
11{
15 protected $ctrl;
16
20 protected $access;
21
25 public function __construct($a_parent_obj, $a_parent_cmd, $a_profile, $a_write_permission = false)
26 {
27 global $DIC;
28
29 $this->ctrl = $DIC->ctrl();
30 $this->lng = $DIC->language();
31 $this->access = $DIC->access();
32 $ilCtrl = $DIC->ctrl();
33 $lng = $DIC->language();
34 $ilAccess = $DIC->access();
35 $lng = $DIC->language();
36
37 $this->profile = $a_profile;
38 parent::__construct($a_parent_obj, $a_parent_cmd);
39 $this->setData($this->profile->getAssignments());
40 $this->setTitle($lng->txt("skmg_assigned_users"));
41
42 if (!$this->profile->getRefId() > 0) {
43 $this->addColumn("", "", "1px", true);
44 $this->setSelectAllCheckbox("id[]");
45 }
46 $this->addColumn($this->lng->txt("type"), "type");
47 $this->addColumn($this->lng->txt("name"), "name");
48 $this->addColumn($this->lng->txt("object"), "object");
49 // $this->addColumn($this->lng->txt("actions"));
50
51 $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
52 $this->setRowTemplate("tpl.profile_user_row.html", "Services/Skill");
53
54 if ($a_write_permission && !$this->profile->getRefId() > 0) {
55 $this->addMultiCommand("confirmUserRemoval", $lng->txt("remove"));
56 }
57 //$this->addCommandButton("", $lng->txt(""));
58 }
59
63 protected function fillRow($a_set)
64 {
66
67 $this->tpl->setVariable("TYPE", $a_set["type"]);
68 $this->tpl->setVariable("NAME", $a_set["name"]);
69 $this->tpl->setVariable("OBJECT", $a_set["object_title"]);
70 if (!$this->profile->getRefId() > 0) {
71 $this->tpl->setCurrentBlock("checkbox");
72 $this->tpl->setVariable("ID", $a_set["id"]);
73 $this->tpl->parseCurrentBlock();
74 }
75 }
76}
An exception for terminatinating execution or to throw for unit testing.
TableGUI class for skill profile user assignment.
__construct($a_parent_obj, $a_parent_cmd, $a_profile, $a_write_permission=false)
Constructor.
Class ilTable2GUI.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
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 $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc