36 public function __construct($a_parent_obj,
string $a_parent_cmd,
string $a_cskill_id, array $a_usage, $a_mode =
"")
40 $this->
ctrl = $DIC->ctrl();
41 $this->
lng = $DIC->language();
42 $this->
access = $DIC->access();
43 $ilCtrl = $DIC->ctrl();
45 $this->tree_repo = $DIC->skills()->internal()->repo()->getTreeRepo();
46 $this->tree_factory = $DIC->skills()->internal()->factory()->tree();
47 $this->tree_manager = $DIC->skills()->internal()->manager()->getTreeManager();
49 $id_parts = explode(
":", $a_cskill_id);
50 $this->skill_id = (
int) $id_parts[0];
51 $this->tref_id = (
int) $id_parts[1];
54 foreach ($a_usage as $k => $v) {
55 $data[] = array(
"type" => $k,
"usages" => $v);
61 $tree = $this->tree_repo->getTreeForNodeId($this->skill_id);
62 if ($a_mode ==
"tree") {
63 $tree_obj = $this->tree_manager->getTree($tree->getTreeId());
70 $path = $tree->getSkillTreePathAsString($this->skill_id, $this->tref_id);
73 $this->
addColumn($this->
lng->txt(
"skmg_type"),
"",
"50%");
74 $this->
addColumn($this->
lng->txt(
"skmg_number"),
"",
"50%");
77 $this->
setRowTemplate(
"tpl.skill_usage_row.html",
"Services/Skill");
84 protected function fillRow(array $a_set): void
88 $this->tpl->setVariable(
"NUMBER", count($a_set[
"usages"]));
setFormAction(string $a_form_action, bool $a_multipart=false)
ilSkillTreeRepository $tree_repo
setDescription(string $a_val)
static _lookupTitle(int $a_obj_id, int $a_tref_id=0)
Tree SkillTreeFactory $tree_factory
__construct($a_parent_obj, string $a_parent_cmd, string $a_cskill_id, array $a_usage, $a_mode="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
TableGUI class for skill usages.
static getObjTypeString(string $a_type)
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
Tree SkillTreeManager $tree_manager
setEnableNumInfo(bool $a_val)
__construct(Container $dic, ilPlugin $plugin)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
static getTypeInfoString(string $a_type)