ILIAS  release_8 Revision v8.24
ilLSLocalDI Class Reference
+ Inheritance diagram for ilLSLocalDI:
+ Collaboration diagram for ilLSLocalDI:

Public Member Functions

 init (ArrayAccess $dic, ArrayAccess $lsdic, DataFactory $data_factory, ilObjLearningSequence $object)
 

Detailed Description

Member Function Documentation

◆ init()

ilLSLocalDI::init ( ArrayAccess  $dic,
ArrayAccess  $lsdic,
DataFactory  $data_factory,
ilObjLearningSequence  $object 
)

Definition at line 31 of file class.ilLSLocalDI.php.

36 : void {
37 $obj_id = (int) $object->getId();
38// $obj_title = $object->getTitle();
39
40 $current_user = $dic['ilUser'];
41 $current_user_id = (int) $current_user->getId();
42
43 $this["obj.ref_id"] = function ($c) use ($object): int {
44 $ref = $object->getRefId();
45 if (!$ref) {
46 $refs = ilObject::_getAllReferences($object->getId());
47 $ref = array_shift($refs);
48 }
49 return (int) $ref;
50 };
51
52 $this["obj.obj_id"] = $obj_id;
53// $this["obj.title"] = (string) $obj_title;
54
55 $this["usr.id"] = $current_user_id;
56
57 $this["obj.sorting"] = function ($c): ilContainerSorting {
58 return ilContainerSorting::_getInstance($c["obj.obj_id"]);
59 };
60
61 $this["db.lsitems"] = function ($c) use ($dic, $lsdic): ilLSItemsDB {
62 $online_status = new LSItemOnlineStatus();
63 return new ilLSItemsDB(
64 $dic["tree"],
65 $c["obj.sorting"],
66 $lsdic["db.postconditions"],
67 $online_status
68 );
69 };
70
71 $this["db.progress"] = function ($c) use ($dic): ilLearnerProgressDB {
72 return new ilLearnerProgressDB(
73 $c["db.lsitems"],
74 $dic["ilAccess"],
75 $dic['ilObjDataCache']
76 );
77 };
78
79 $this["learneritems"] = function ($c) use ($dic, $lsdic): ilLSLearnerItemsQueries {
80 return new ilLSLearnerItemsQueries(
81 $c["db.progress"],
82 $lsdic["db.states"],
83 $c["obj.ref_id"],
84 $c["usr.id"]
85 );
86 };
87
88
89 $this["get.params"] = function ($c) use ($dic): ArrayBasedRequestWrapper {
90 return $dic["http"]->wrapper()->query();
91 };
92
93
94 $this["gui.learner"] = function ($c) use ($dic, $lsdic, $object): ilObjLearningSequenceLearnerGUI {
95 $intro = $object->getContentPageHTML($object::CP_INTRO);
96 $extro = $object->getContentPageHTML($object::CP_EXTRO);
97
99 $c["usr.id"],
100 $dic["ilAccess"],
101 $dic["ilCtrl"],
102 $dic["lng"],
103 $dic["tpl"],
104 $dic["ilToolbar"],
105 $dic["ui.factory"],
106 $dic["ui.renderer"],
107 $c["roles"],
108 $lsdic["db.settings"]->getSettingsFor($c["obj.obj_id"]),
109 $c["player.curriculumbuilder"],
110 $c["player.launchlinksbuilder"],
111 $c["player"],
112 $intro,
113 $extro,
114 $c["get.params"]
115 );
116 };
117
118 $this["player.urlbuilder.lp"] = function ($c) use ($dic, $data_factory): LSUrlBuilder {
119 $player_base_url = $dic['ilCtrl']->getLinkTargetByClass(
120 'ilObjLearningSequenceLPPollingGUI',
122 '',
123 false,
124 false
125 );
126 $player_base_url = $data_factory->uri(ILIAS_HTTP_PATH . '/' . $player_base_url);
127
128 return new LSUrlBuilder($player_base_url);
129 };
130 $this["gui.learner.lp"] = function ($c) use ($dic): ilObjLearningSequenceLPPollingGUI {
132 $dic["ilCtrl"],
133 $c["usr.id"],
134 $dic['ilObjDataCache'],
135 $dic->refinery(),
136 $dic->http()->wrapper()->query()
137 );
138 };
139
140 $this["gui.toc"] = function ($c) use ($dic): ilLSTOCGUI {
141 return new ilLSTOCGUI(
142 $c["player.urlbuilder"],
143 $dic["ilCtrl"]
144 );
145 };
146
147 $this["gui.loc"] = function ($c) use ($dic): ilLSLocatorGUI {
148 return new ilLSLocatorGUI(
149 $c["player.urlbuilder"],
150 $dic["ui.factory"]
151 );
152 };
153
154 $this["player.viewfactory"] = function ($c) use ($dic): ilLSViewFactory {
155 return new ilLSViewFactory(
156 $dic['service.kiosk_mode'],
157 $dic["lng"],
158 $dic["ilAccess"]
159 );
160 };
161
162 $this["player.urlbuilder"] = function ($c) use ($dic, $data_factory): LSUrlBuilder {
163 $player_base_url = $dic['ilCtrl']->getLinkTargetByClass(
164 'ilObjLearningSequenceLearnerGUI',
166 '',
167 false,
168 false
169 );
170 $player_base_url = $data_factory->uri(ILIAS_HTTP_PATH . '/' . $player_base_url);
171
172 return new LSUrlBuilder($player_base_url);
173 };
174
175 $this["globalsetttings"] = function ($c) use ($dic): \LSGlobalSettings {
176 $db = new ilLSGlobalSettingsDB($dic['ilSetting']);
177 return $db->getSettings();
178 };
179
180 $this["player.controlbuilder"] = function ($c) use ($dic): LSControlBuilder {
181 return new LSControlBuilder(
182 $dic["ui.factory"],
183 $c["player.urlbuilder"],
184 $dic["lng"],
185 $c["globalsetttings"],
186 $c["player.urlbuilder.lp"]
187 );
188 };
189
190 $this["player.kioskrenderer"] = function ($c) use ($dic): ilKioskPageRenderer {
191 $kiosk_template = new ilTemplate("tpl.kioskpage.html", true, true, 'Modules/LearningSequence');
192 $window_title = $dic['ilSetting']->get('short_inst_name', 'ILIAS');
193
194 return new ilKioskPageRenderer(
195 $dic["tpl"],
196 $dic["global_screen"]->layout()->meta(),
197 $dic["ui.factory"],
198 $dic["ui.renderer"],
199 $dic['lng'],
200 $kiosk_template,
201 $c["gui.toc"],
202 $c["gui.loc"],
203 $window_title
204 );
205 };
206
207 $this["player.curriculumbuilder"] = function ($c) use ($dic): ilLSCurriculumBuilder {
208 return new ilLSCurriculumBuilder(
209 $c["learneritems"],
210 $dic["ui.factory"],
211 $dic["lng"],
213 $c["player.urlbuilder"]
214 );
215 };
216
217 $this["player.launchlinksbuilder"] = function ($c) use ($dic): ilLSLaunchlinksBuilder {
218 $first_access = $c["learneritems"]->getFirstAccess();
219
220 return new ilLSLaunchlinksBuilder(
221 $dic["lng"],
222 $dic["ilAccess"],
223 $dic["ilCtrl"],
224 $dic["ui.factory"],
225 $c["obj.ref_id"],
226 $c["usr.id"],
227 $first_access,
228 $c["roles"],
229 $c["learneritems"]
230 );
231 };
232
233 $this["player"] = function ($c) use ($dic, $lsdic): ilLSPlayer {
234 return new ilLSPlayer(
235 $c["learneritems"],
236 $c["player.controlbuilder"],
237 $c["player.urlbuilder"],
238 $c["player.curriculumbuilder"],
239 $c["player.viewfactory"],
240 $c["player.kioskrenderer"],
241 $dic["ui.factory"],
242 $lsdic["gs.current_context"],
243 $dic["refinery"]
244 );
245 };
246
247 $this["participants"] = function ($c) use ($dic): ilLearningSequenceParticipants {
249 $c["obj.obj_id"],
250 $dic["ilLoggerFactory"]->getRootLogger(),
251 $dic["ilAppEventHandler"],
252 $dic["ilSetting"]
253 );
254 };
255
256 $this["roles"] = function ($c) use ($dic, $current_user): ilLearningSequenceRoles {
257 return new ilLearningSequenceRoles(
258 $c["obj.ref_id"],
259 $c["obj.obj_id"],
260 $c["participants"],
261 $dic["ilCtrl"],
262 $dic["rbacadmin"],
263 $dic["rbacreview"],
264 $dic["ilDB"],
265 $current_user,
266 $dic['lng']
267 );
268 };
269
270 $this["ui.renderer"] = function ($c) use ($dic): ILIAS\UI\Renderer {
271 return $dic['ui.renderer'];
272 };
273 }
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...
static _getInstance(int $a_obj_id)
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...
Definition: ilLSItemsDB.php:25
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This combines calls to ProgressDB and StateDB to handle learner-items in the context of a specific LS...
GUI for Locator element.
Implementation of KioskMode Player.
Tree-GUI for ToC.
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getAllReferences(int $id)
get all reference ids for object ID
special template class to simplify handling of ITX/PEAR
$c
Definition: cli.php:38
An entity that renders components to a string output.
Definition: Renderer.php:31
$dic
Definition: result.php:32

References ilObject\_getAllReferences(), ilObject\getId(), and ilObject\getRefId().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: