ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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.

References Vendor\Package\$c, ilObject\_getAllReferences(), ilContainerSorting\_getInstance(), LSControlBuilder\CMD_CHECK_CURRENT_ITEM_LP, ilObjLearningSequenceLearnerGUI\CMD_VIEW, EXTRO, ilObjLearningSequence\getContentPageHTML(), ilObject\getId(), ilObject\getRefId(), ILIAS\Repository\int(), and ilLSPlayer\LSO_CMD_GOTO.

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

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