ILIAS  release_8 Revision v8.24
class.SkillProfileService.php
Go to the documentation of this file.
1<?php
2
20namespace ILIAS\Skill\Service;
21
23
29{
32
33 public function __construct(SkillInternalService $internal_service)
34 {
35 $this->profile_manager = $internal_service->manager()->getProfileManager();
36 $this->profile_completion_manager = $internal_service->manager()->getProfileCompletionManager();
37 }
38
42 public function getById(int $profile_id): Profile\SkillProfile
43 {
44 return $this->profile_manager->getById($profile_id);
45 }
46
47 public function delete(int $profile_id): void
48 {
49 $this->profile_manager->delete($profile_id);
50 $this->profile_completion_manager->deleteEntriesForProfile($profile_id);
51 }
52
53 public function lookupTitle(int $profile_id): string
54 {
55 $title = $this->profile_manager->lookupTitle($profile_id);
56 return $title;
57 }
58
59 public function lookupRefId(int $profile_id): int
60 {
61 $ref_id = $this->profile_manager->lookupRefId($profile_id);
62 return $ref_id;
63 }
64
65 public function getProfilesOfUser(int $user_id): array
66 {
67 return $this->profile_manager->getProfilesOfUser($user_id);
68 }
69
70 public function getAllGlobalProfiles(): array
71 {
72 $profiles = $this->profile_manager->getAllGlobalProfiles();
73 return $profiles;
74 }
75
76 public function addRoleToProfile(int $profile_id, int $role_id): void
77 {
78 $this->profile_manager->addRoleToProfile($profile_id, $role_id);
79 }
80
84 public function updateRefIdAfterImport(int $profile_id, int $new_ref_id): void
85 {
86 $this->profile_manager->updateRefIdAfterImport($profile_id, $new_ref_id);
87 }
88
92 public function writeCompletionEntryForAllProfiles(int $user_id): void
93 {
94 $this->profile_completion_manager->writeCompletionEntryForAllProfiles($user_id);
95 }
96}
addRoleToProfile(int $profile_id, int $role_id)
__construct(SkillInternalService $internal_service)
Profile SkillProfileCompletionManager $profile_completion_manager
writeCompletionEntryForAllProfiles(int $user_id)
Write profile completion entries (fulfilled or non-fulfilled) of user for all profiles.
updateRefIdAfterImport(int $profile_id, int $new_ref_id)
Update the old ref id with the new ref id after import.
$ref_id
Definition: ltiauth.php:67
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...