ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilSkillLevelProfileAssignmentTableGUI.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  public function __construct($a_parent_obj, $a_parent_cmd, $a_cskill_id)
21  {
22  global $DIC;
23 
24  $this->ctrl = $DIC->ctrl();
25  $this->lng = $DIC->language();
26  $ilCtrl = $DIC->ctrl();
27  $lng = $DIC->language();
28 
29  $parts = explode(":", $a_cskill_id);
30  $this->skill_id = (int) $parts[0];
31  $this->tref_id = (int) $parts[1];
32 
33  $this->skill = new ilBasicSkill($this->skill_id);
34  parent::__construct($a_parent_obj, $a_parent_cmd);
35  $this->setData($this->skill->getLevelData());
36  $this->setTitle($this->skill->getTitle() . ", " .
37  $lng->txt("skmg_skill_levels"));
38 
39  $this->addColumn($this->lng->txt("title"));
40  $this->addColumn($this->lng->txt("actions"));
41 
42  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
43  $this->setRowTemplate("tpl.skill_level_profile_assignment_row.html", "Services/Skill");
44  }
45 
49  protected function fillRow($a_set)
50  {
51  $lng = $this->lng;
52  $ilCtrl = $this->ctrl;
53 
54  $this->tpl->setCurrentBlock("cmd");
55  $this->tpl->setVariable("CMD", $lng->txt("skmg_assign_level"));
56  $ilCtrl->setParameter($this->parent_obj, "level_id", (int) $a_set["id"]);
57  $this->tpl->setVariable("CMD_HREF", $ilCtrl->getLinkTarget(
58  $this->parent_obj,
59  "assignLevelToProfile"
60  ));
61  $ilCtrl->setParameter($this->parent_obj, "level_id", $_GET["level_id"]);
62  $this->tpl->parseCurrentBlock();
63 
64  $this->tpl->setVariable("TITLE", $a_set["title"]);
65  }
66 }
$_GET["client_id"]
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
global $DIC
Definition: goto.php:24
setRowTemplate($a_template, $a_template_dir="")
Set row template.
TableGUI class for skill profile skill level assignment.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
__construct(Container $dic, ilPlugin $plugin)
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.
__construct($a_parent_obj, $a_parent_cmd, $a_cskill_id)
Constructor.
Basic Skill.