ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilStudyProgrammeDIC.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
8 {
9  public static $dic;
10 
11  public static function dic() : Container
12  {
13  if (!self::$dic) {
14  self::$dic = self::buildDIC();
15  }
16  return self::$dic;
17  }
18 
19  public static function specificDicFor(\ilObjStudyProgramme $prg) : Container
20  {
21  global $DIC;
22  $dic = new Container();
23 
24  $dic['permissionhelper'] = function ($dic) use ($prg, $DIC) {
25  return new ilPRGPermissionsHelper(
26  $DIC['ilAccess'],
28  $prg
29  );
30  };
31 
32  return $dic;
33  }
34 
35 
36  protected static function buildDIC() : Container
37  {
38  global $DIC;
39  $dic = new Container();
40 
41  $dic['ilAppEventHandler'] = function ($dic) use ($DIC) {
42  return $DIC->offsetExists('ilAppEventHandler') ?
43  $DIC['ilAppEventHandler'] : new \ilAppEventHandler();
44  };
45  $dic['ilStudyProgrammeEvents'] = function ($dic) {
46  return new ilStudyProgrammeEvents(
47  $dic['ilAppEventHandler'],
48  $dic['model.Assignment.ilStudyProgrammeAssignmentRepository']
49  );
50  };
51  $dic['model.Settings.ilStudyProgrammeSettingsRepository'] = function ($dic) use ($DIC) {
53  $DIC['ilDB']
54  );
55  };
56  $dic['model.Progress.ilStudyProgrammeProgressRepository'] = function ($dic) use ($DIC) {
57  return new ilStudyProgrammeProgressDBRepository($DIC['ilDB']);
58  };
59  $dic['model.Assignment.ilStudyProgrammeAssignmentRepository'] = function ($dic) use ($DIC) {
60  return new ilStudyProgrammeAssignmentDBRepository($DIC['ilDB']);
61  };
62  $dic['model.AutoMemberships.ilStudyProgrammeAutoMembershipsRepository'] = function ($dic) use ($DIC) {
64  $DIC['ilDB'],
65  (int) $DIC['ilUser']->getId()
66  );
67  };
68  $dic['model.AutoMemberships.ilStudyProgrammeMembershipSourceReaderFactory'] = function ($dic) use ($DIC) {
70  };
71 
72  $dic['model.Type.ilStudyProgrammeTypeRepository'] = function ($dic) use ($DIC) {
74  $DIC['ilDB'],
75  $dic['model.Settings.ilStudyProgrammeSettingsRepository'],
76  $DIC->filesystem()->web(),
77  $DIC['ilUser'],
78  $DIC['ilPluginAdmin'],
79  $DIC['lng']
80  );
81  };
82  $dic['model.AutoCategories.ilStudyProgrammeAutoCategoriesRepository'] = function ($dic) use ($DIC) {
84  $DIC['ilDB'],
85  (int) $DIC['ilUser']->getId()
86  );
87  };
88  $dic['ilObjStudyProgrammeSettingsGUI'] = function ($dic) use ($DIC) {
90  $DIC['tpl'],
91  $DIC['ilCtrl'],
92  $DIC['lng'],
93  $DIC->ui()->factory()->input(),
94  $DIC->ui()->renderer(),
95  $DIC->http()->request(),
96  $DIC->refinery(),
97  $dic['DataFactory'],
98  $dic['model.Type.ilStudyProgrammeTypeRepository'],
99  $dic['ilStudyProgrammeCommonSettingsGUI'],
100  $DIC['ilTabs']
101  );
102  };
103 
104  $dic['PRGMessages'] = function ($dic) use ($DIC) {
106  return new ilPRGMessagePrinter(
107  $messages,
108  $DIC['lng']
109  );
110  };
111 
112  $dic['ilObjStudyProgrammeMembersGUI'] = function ($dic) use ($DIC) {
114  $DIC['tpl'],
115  $DIC['ilCtrl'],
116  $DIC['ilToolbar'],
117  $DIC['lng'],
118  $DIC['ilUser'],
119  $DIC['ilTabs'],
120  $dic['ilStudyProgrammeUserProgressDB'],
121  $dic['ilStudyProgrammeUserAssignmentDB'],
122  $dic['ilStudyProgrammeRepositorySearchGUI'],
123  $dic['ilObjStudyProgrammeIndividualPlanGUI'],
124  $dic['PRGMessages'],
125  $dic['DataFactory'],
126  new ilConfirmationGUI()
127  );
128  };
129  $dic['ilObjStudyProgrammeAutoMembershipsGUI'] = function ($dic) use ($DIC) {
131  $DIC['tpl'],
132  $DIC['ilCtrl'],
133  $DIC['ilToolbar'],
134  $DIC['lng'],
135  $DIC->ui()->factory(),
136  $DIC['ui.factory']->messageBox(),
137  $DIC['ui.factory']->button(),
138  $DIC->ui()->renderer(),
139  $DIC->http()->request(),
140  $DIC['tree']
141  );
142  };
143  $dic['ilObjStudyProgrammeTreeGUI'] = function ($dic) use ($DIC) {
144  return new ilObjStudyProgrammeTreeGUI(
145  $DIC['tpl'],
146  $DIC['ilCtrl'],
147  $DIC['ilAccess'],
148  $DIC['ilToolbar'],
149  $DIC['lng'],
150  $DIC['ilLog'],
151  $DIC['ilias'],
152  $DIC['ilSetting']
153  );
154  };
155  $dic['ilStudyProgrammeTypeGUI'] = function ($dic) use ($DIC) {
156  return new ilStudyProgrammeTypeGUI(
157  $DIC['tpl'],
158  $DIC['ilCtrl'],
159  $DIC['ilAccess'],
160  $DIC['ilToolbar'],
161  $DIC['lng'],
162  $DIC['ilias'],
163  $DIC['ilTabs'],
164  $dic['model.Type.ilStudyProgrammeTypeRepository'],
165  $DIC->ui()->factory()->input(),
166  $DIC->ui()->renderer(),
167  $DIC->http()->request(),
168  $DIC->refinery()
169  );
170  };
171  $dic['ilStudyProgrammeRepositorySearchGUI'] = function ($dic) {
173  };
174  $dic['ilObjStudyProgrammeIndividualPlanGUI'] = function ($dic) use ($DIC) {
176  $DIC['tpl'],
177  $DIC['ilCtrl'],
178  $DIC['lng'],
179  $DIC['ilUser'],
180  $dic['ilStudyProgrammeUserProgressDB'],
181  $dic['ilStudyProgrammeUserAssignmentDB'],
182  $dic['PRGMessages']
183  );
184  };
185  $dic['ilObjStudyProgrammeAutoCategoriesGUI'] = function ($dic) use ($DIC) {
187  $DIC['tpl'],
188  $DIC['ilCtrl'],
189  $DIC['ilToolbar'],
190  $DIC['lng'],
191  $DIC->ui()->factory(),
192  $DIC['ui.factory']->messageBox(),
193  $DIC['ui.factory']->button(),
194  $DIC->ui()->renderer(),
195  $DIC->http()->request(),
196  $DIC['tree']
197  );
198  };
199  $dic['DataFactory'] = function ($dic) use ($DIC) {
200  return new \ILIAS\Data\Factory();
201  };
202  $dic['ilStudyProgrammeUserProgressDB'] = function ($dic) use ($DIC) {
203  return $dic['model.Progress.ilStudyProgrammeProgressRepository'];
204  };
205 
206  $dic['ilStudyProgrammeUserAssignmentDB'] = function ($dic) use ($DIC) {
207  return $dic['model.Assignment.ilStudyProgrammeAssignmentRepository'];
208  };
209 
210  $dic['ilOrgUnitObjectTypePositionSetting'] = function ($dic) {
211  return new ilOrgUnitObjectTypePositionSetting('prg');
212  };
213 
214  $dic['ilStudyProgrammeMailMemberSearchGUI'] = function ($dic) use ($DIC) {
216  $DIC['ilCtrl'],
217  $DIC['tpl'],
218  $DIC['lng'],
219  $DIC['ilAccess']
220  );
221  };
222  $dic['ilStudyProgrammeChangeExpireDateGUI'] = function ($dic) use ($DIC) {
224  $DIC['ilCtrl'],
225  $DIC['tpl'],
226  $DIC['lng'],
227  $DIC['ilAccess'],
228  $DIC['ilUser'],
229  $DIC->ui()->factory()->input(),
230  $DIC->ui()->renderer(),
231  $DIC->http()->request(),
232  $DIC->refinery(),
233  $dic['DataFactory'],
234  $dic['PRGMessages']
235  );
236  };
237  $dic['ilStudyProgrammeChangeDeadlineGUI'] = function ($dic) use ($DIC) {
239  $DIC['ilCtrl'],
240  $DIC['tpl'],
241  $DIC['lng'],
242  $DIC['ilAccess'],
243  $DIC['ilUser'],
244  $DIC->ui()->factory()->input(),
245  $DIC->ui()->renderer(),
246  $DIC->http()->request(),
247  $DIC->refinery(),
248  $dic['DataFactory'],
249  $dic['PRGMessages']
250  );
251  };
252  $dic['ilStudyProgrammeDashboardViewGUI'] = function ($dic) use ($DIC) {
254  $DIC['lng'],
255  $DIC['ilUser'],
256  $DIC['ilAccess'],
257  $DIC['ilSetting'],
258  $DIC['ui.factory'],
259  $DIC['ui.renderer'],
260  $DIC['ilCtrl'],
261  $dic['Log']
262  );
263  };
264 
265  $dic['ilStudyProgrammeCommonSettingsGUI'] = function ($dic) use ($DIC) {
267  $DIC['ilCtrl'],
268  $DIC['tpl'],
269  $DIC['lng'],
270  $DIC->object()
271  );
272  };
273 
274  $dic['Log'] = function ($dic) {
275  return ilLoggerFactory::getLogger('prg');
276  };
277 
278  $dic['current_user'] = function ($dic) use ($DIC) {
279  return $DIC['ilUser'];
280  };
281 
282  return $dic;
283  }
284 }
Util around ilPRGMessageCollection factors and output collections.
Class ilOrgUnitPositionAccess.
$messages
Definition: xapiexit.php:5
Provides adapters to read member-ids from a specific source.
global $DIC
Definition: goto.php:24
ilObjStudyProgrammeMembersGUI: ilStudyProgrammeRepositorySearchGUI ilObjStudyProgrammeMembersGUI: il...
static specificDicFor(\ilObjStudyProgramme $prg)
Both role and OrgU-based permissions are relevant in many places of the PRG.
Custom repository search gui class for study programme to make it possible to get a handle on users s...
$dic
Definition: result.php:13
static getLogger($a_component_id)
Get component logger.
ilObjStudyProgrammeSettingsGUI: ilStudyProgrammeCommonSettingsGUI
Object settings regarding position permissions.
Class ilObjStudyProgrammeTreeGUI Generates the manage view for ilTrainingProgramme-Repository objects...
Confirmation screen class.
Holds information about multi-actions, mainly in context of member-assignemnts and status changes...