ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
class.ilOrgUnitLocalDIC.php
Go to the documentation of this file.
1 <?php
2 
20 declare(strict_types=1);
21 
23 
25 {
26  public static ?Container $dic = null;
27 
28  public static function dic(): Container
29  {
30  if (!self::$dic) {
31  self::$dic = self::buildDIC();
32  }
33  return self::$dic;
34  }
35 
36  protected static function buildDIC(): Container
37  {
38  global $DIC;
39  $dic = new Container();
40 
41  $dic['repo.UserAssignments'] = static fn($dic) => new ilOrgUnitUserAssignmentDBRepository($DIC['ilDB']);
42  $dic['repo.Authorities'] = static fn($dic) => new ilOrgUnitAuthorityDBRepository($DIC['ilDB']);
43  $dic['repo.Positions'] = static fn($dic) => new ilOrgUnitPositionDBRepository(
44  $DIC['ilDB'],
45  $dic['repo.Authorities'],
46  $dic['repo.UserAssignments'],
47  $dic['lng']
48  );
49  $dic['repo.OperationContexts'] = static fn($dic) => new ilOrgUnitOperationContextDBRepository($DIC['ilDB']);
50  $dic['repo.Operations'] = static fn($dic) => new ilOrgUnitOperationDBRepository(
51  $DIC['ilDB'],
52  $dic["repo.OperationContexts"]
53  );
54  $dic['repo.Permissions'] = static fn($dic) => new ilOrgUnitPermissionDBRepository(
55  $DIC['ilDB'],
56  $dic["repo.Operations"],
57  $dic["repo.OperationContexts"]
58  );
59  $dic['ui.factory'] = static fn(): \ILIAS\UI\Factory => $DIC['ui.factory'];
60  $dic['ui.renderer'] = static fn(): \ILIAS\UI\Renderer => $DIC['ui.renderer'];
61  $dic['query'] = static fn(): \ILIAS\HTTP\Wrapper\RequestWrapper => $DIC['http']->wrapper()->query();
62  $dic['refinery'] = static fn(): \ILIAS\Refinery\Factory => $DIC['refinery'];
63  $dic['access'] = static fn(): \ilAccessHandler => $DIC['ilAccess'];
64  $dic['lng'] = static fn(): \ilLanguage => $DIC['lng'];
65  $dic['ctrl'] = static fn(): \ilCtrl => $DIC['ilCtrl'];
66  $dic['tabs'] = static fn(): \ilTabsGUI => $DIC['ilTabs'];
67  $dic['resource_storage'] = static fn(): \ILIAS\ResourceStorage\Services => $DIC['resource_storage'];
68  return $dic;
69  }
70 }
Class ilCtrl provides processing control methods.
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...
Interface RequestWrapper.
global $DIC
Definition: shib_login.php:25
Builds data types.
Definition: Factory.php:35
$dic
Definition: ltiresult.php:33
language handling