ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.SkillService.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Skill\Service;
22
24use ILIAS\Survey;
25use ILIAS\Test;
27
33{
37 protected int $skmg_ref_id = 0;
38 protected \ilTree $repository_tree;
39 protected \ilRbacSystem $rbac_system;
40 protected int $usr_id = 0;
41
42 public function __construct()
43 {
44 global $DIC;
45
46 $this->repository_tree = $DIC->repositoryTree();
47 $skmg_obj = current(\ilObject::_getObjectsByType("skmg"));
48 if ($skmg_obj) {
49 $this->skmg_ref_id = (int) current(\ilObject::_getAllReferences((int) $skmg_obj["obj_id"]));
50 }
51 $this->rbac_system = $DIC->rbac()->system();
52 $this->usr_id = $DIC->user()->getId();
53 }
54
58 public function user(int $id): SkillUserService
59 {
60 return new SkillUserService($id);
61 }
62
66 public function ui(): SkillUIService
67 {
68 return new SkillUIService();
69 }
70
74 public function tree(): SkillTreeService
75 {
76 return new SkillTreeService($this->internal());
77 }
78
82 public function profile(): SkillProfileService
83 {
84 return new SkillProfileService($this->internal());
85 }
86
90 public function personal(): SkillPersonalService
91 {
92 return new SkillPersonalService($this->internal());
93 }
94
98 public function usage(): SkillUsageService
99 {
100 return new SkillUsageService($this->internal());
101 }
102
106 public function internal(): SkillInternalService
107 {
108 return new SkillInternalService(
109 $this->skmg_ref_id,
112 $this->usr_id
113 );
114 }
115
120 {
122 }
123
128 {
130 }
131}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
personal()
External personal service facade.
tree()
External tree service facade.
usage()
External usage service facade.
user(int $id)
External user service facade.
internalSurvey()
Internal service for Skill classes in Survey Module.
profile()
External profile service facade.
function $this $this $this usr_id
internalContainer()
Internal service for Skill classes in Container Service.
ui()
External ui service facade.
static _getAllReferences(int $id)
get all reference ids for object ID
static _getObjectsByType(string $obj_type="", ?int $owner=null)
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26