ILIAS  trunk Revision v11.0_alpha-1702-gfd3ecb7f852
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.PersonalSkillManager.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Skill\Personal;
22 
27 {
29 
30  public function __construct(
31  ?\ILIAS\Skill\Personal\PersonalSkillDBRepository $personal_repo = null
32  ) {
33  global $DIC;
34 
35  $this->personal_repo = ($personal_repo) ?: $DIC->skills()->internal()->repo()->getPersonalSkillRepo();
36  }
37 
41  public function getSelectedUserSkills(int $user_id): array
42  {
43  return $this->personal_repo->get($user_id);
44  }
45 
46  public function addPersonalSkill(int $user_id, int $skill_node_id): void
47  {
48  $this->personal_repo->add($user_id, $skill_node_id);
49  }
50 
51  public function removePersonalSkill(int $user_id, int $skill_node_id): void
52  {
53  $this->personal_repo->remove($user_id, $skill_node_id);
54  }
55 
56  public function removePersonalSkillsForUser(int $user_id): void
57  {
58  $this->personal_repo->removeAllForUser($user_id);
59  }
60 
61  public function removePersonalSkillsForSkill(int $skill_node_id): void
62  {
63  $this->personal_repo->removeAllForSkill($skill_node_id);
64  }
65 }
Interface Observer Contains several chained tasks and infos about them.
removePersonalSkill(int $user_id, int $skill_node_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct(?\ILIAS\Skill\Personal\PersonalSkillDBRepository $personal_repo=null)
global $DIC
Definition: shib_login.php:22
addPersonalSkill(int $user_id, int $skill_node_id)