ILIAS  release_8 Revision v8.24
class.SkillService.php
Go to the documentation of this file.
1<?php
2
20namespace ILIAS\Skill\Service;
21
27{
31 protected int $skmg_ref_id = 0;
32 protected \ilTree $repository_tree;
33 protected \ilRbacSystem $rbac_system;
34 protected int $usr_id = 0;
35
36 public function __construct()
37 {
38 global $DIC;
39
40 $this->repository_tree = $DIC->repositoryTree();
41 $skmg_obj = current(\ilObject::_getObjectsByType("skmg"));
42 if ($skmg_obj) {
43 $this->skmg_ref_id = (int) current(\ilObject::_getAllReferences((int) $skmg_obj["obj_id"]));
44 }
45 $this->rbac_system = $DIC->rbac()->system();
46 $this->usr_id = $DIC->user()->getId();
47 }
48
52 public function user(int $id): SkillUserService
53 {
54 return new SkillUserService($id);
55 }
56
60 public function ui(): SkillUIService
61 {
62 return new SkillUIService();
63 }
64
68 public function tree(): SkillTreeService
69 {
70 return new SkillTreeService($this->internal());
71 }
72
76 public function profile(): SkillProfileService
77 {
78 return new SkillProfileService($this->internal());
79 }
80
84 public function internal(): SkillInternalService
85 {
86 return new SkillInternalService(
87 $this->skmg_ref_id,
90 $this->usr_id
91 );
92 }
93}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
tree()
External tree service facade.
user(int $id)
External user service facade.
profile()
External profile service facade.
function $this $this $this usr_id
ui()
External ui service facade.
static _getObjectsByType(string $obj_type="", int $owner=null)
static _getAllReferences(int $id)
get all reference ids for object ID
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...