38 public function __construct($a_parent_obj,
string $a_parent_cmd,
int $a_skill_tree_id)
42 $this->
ctrl = $DIC->ctrl();
43 $this->
lng = $DIC->language();
44 $this->
access = $DIC->access();
45 $this->admin_gui_request =
$DIC->skills()->internal()->gui()->admin_request();
46 $ilCtrl =
$DIC->ctrl();
49 $this->requested_ref_id = $this->admin_gui_request->getRefId();
50 $this->requested_sprof_id = $this->admin_gui_request->getSkillProfileId();
52 $this->tree_access_manager =
$DIC->skills()->internal()->manager()->getTreeAccessManager($this->requested_ref_id);
53 $this->profile_manager =
$DIC->skills()->internal()->manager()->getProfileManager();
56 if ($a_skill_tree_id == 0) {
63 if ($this->tree_access_manager->hasManageProfilesPermission()) {
73 $this->
setRowTemplate(
"tpl.skill_profile_row.html",
"Services/Skill");
75 if ($this->tree_access_manager->hasManageProfilesPermission()) {
84 return $this->profile_manager->getProfilesForAllSkillTrees();
89 return $this->profile_manager->getProfilesForSkillTree($a_skill_tree_id);
92 protected function fillRow(array $a_set): void
97 $this->tpl->setCurrentBlock(
"cmd");
98 if ($this->tree_access_manager->hasManageProfilesPermission()) {
99 $this->tpl->setVariable(
"CMD",
$lng->
txt(
"edit"));
101 $this->tpl->setVariable(
"CMD",
$lng->
txt(
"show"));
103 $ilCtrl->
setParameter($this->parent_obj,
"sprof_id", $a_set[
"id"]);
104 $this->tpl->setVariable(
"CMD_HREF", $ilCtrl->getLinkTarget($this->parent_obj,
"showLevels"));
105 $ilCtrl->setParameter($this->parent_obj,
"sprof_id", $this->requested_sprof_id);
106 $this->tpl->parseCurrentBlock();
107 if ($this->tree_access_manager->hasManageProfilesPermission()) {
108 $this->tpl->setCurrentBlock(
"checkbox");
109 $this->tpl->setVariable(
"ID", $a_set[
"id"]);
110 $this->tpl->parseCurrentBlock();
112 $this->tpl->setVariable(
"TITLE", $a_set[
"title"]);
114 $profile_ref_id = $this->profile_manager->lookupRefId($a_set[
"id"]);
117 if ($profile_ref_id > 0) {
118 $this->tpl->setVariable(
120 $lng->
txt(
"skmg_context_local") .
" (" . $profile_obj_title .
")"
123 $this->tpl->setVariable(
"CONTEXT",
$lng->
txt(
"skmg_context_global"));
126 $this->tpl->setVariable(
"NUM_USERS", $this->profile_manager->countUsers($a_set[
"id"]));
127 $this->tpl->setVariable(
"NUM_ROLES", $this->profile_manager->countRoles($a_set[
"id"]));
Request wrapper for guis in skill administration.
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _lookupObjectId(int $ref_id)
static _lookupTitle(int $obj_id)
TableGUI class for skill profiles.
getProfilesForSkillTree(int $a_skill_tree_id)
SkillAdminGUIRequest $admin_gui_request
__construct($a_parent_obj, string $a_parent_cmd, int $a_skill_tree_id)
SkillProfileManager $profile_manager
SkillTreeAccess $tree_access_manager
fillRow(array $a_set)
Standard Version of Fill Row.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
addMultiCommand(string $a_cmd, string $a_text)
setFormAction(string $a_form_action, bool $a_multipart=false)
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)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setData(array $a_data)
Set table data.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc