3 declare(strict_types=1);
52 $this->
ctrl = $DIC->ctrl();
53 $this->
lng = $DIC->language();
54 $this->tpl = $DIC[
"tpl"];
55 $this->ui_factory = $DIC->ui()->factory();
56 $this->ui_renderer = $DIC->ui()->renderer();
59 $this->profile_service = $DIC->skills()->profile();
64 $this->
setTitle($this->
lng->txt(
"cont_skill_ass_profiles"));
67 $this->
addColumn($this->
lng->txt(
"cont_skill_profile"),
"",
"1");
72 $this->
setRowTemplate(
"tpl.cont_profile_row.html",
"Services/Container/Skills");
75 if ($this->skmg_settings->getLocalAssignmentOfProfiles()) {
76 $this->
addMultiCommand(
"confirmRemoveSelectedGlobalProfiles", $this->
lng->txt(
"remove"));
78 if ($this->skmg_settings->getAllowLocalProfiles()) {
79 $this->
addMultiCommand(
"confirmDeleteSelectedLocalProfiles", $this->
lng->txt(
"delete"));
86 if ($this->skmg_settings->getLocalAssignmentOfProfiles()) {
87 foreach ($this->profile_service->getGlobalProfilesOfRole($this->cont_member_role_id) as $gp) {
91 if ($this->skmg_settings->getAllowLocalProfiles()) {
92 foreach ($this->profile_service->getLocalProfilesOfRole($this->cont_member_role_id) as $lp) {
99 foreach ($profiles as $profile) {
100 $profiles_array[$profile->getId()] = [
101 "profile_id" => $profile->getId(),
102 "title" => $profile->getTitle(),
105 ksort($profiles_array);
107 return $profiles_array;
110 protected function fillRow(array $a_set): void
118 $tpl->setVariable(
"TITLE", $a_set[
"title"]);
119 $tpl->setVariable(
"ID", $a_set[
"profile_id"]);
121 if ($this->profile_service->lookupProfileRefId($a_set[
"profile_id"]) > 0) {
122 $tpl->setVariable(
"CONTEXT",
$lng->
txt(
"skmg_context_local"));
124 $tpl->setVariable(
"CONTEXT",
$lng->
txt(
"skmg_context_global"));
131 if ($this->profile_service->lookupProfileRefId($a_set[
"profile_id"]) > 0) {
133 $ui_factory->
link()->standard(
137 $ui_factory->
link()->standard(
144 $ui_factory->
link()->standard(
151 $dropdown = $this->ui_factory->dropdown()->standard($items)->withLabel(
$lng->
txt(
"actions"));
152 $tpl->setVariable(
"ACTIONS", $ui_renderer->
render($dropdown));
An entity that renders components to a string output.
link()
description: purpose: > Links are used navigate to other resources or views of the system by clickin...
getLinkTargetByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
render($component, ?Renderer $root=null)
Render given component.
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...
setFormAction(string $a_form_action, bool $a_multipart=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
setParameterByClass(string $a_class, string $a_parameter, $a_value)
static getDefaultMemberRole(int $a_ref_id)
TableGUI class for competence profiles in containers.
__construct( $a_parent_obj, string $a_parent_cmd, int $cont_ref_id)
ilSkillManagementSettings $skmg_settings
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
getLinkTarget(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
SkillProfileService $profile_service
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)
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
addMultiCommand(string $a_cmd, string $a_text)