ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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  );
48  $dic['repo.OperationContexts'] = static fn($dic) => new ilOrgUnitOperationContextDBRepository($DIC['ilDB']);
49  $dic['repo.Operations'] = static fn($dic) => new ilOrgUnitOperationDBRepository(
50  $DIC['ilDB'],
51  $dic["repo.OperationContexts"]
52  );
53  $dic['repo.Permissions'] = static fn($dic) => new ilOrgUnitPermissionDBRepository(
54  $DIC['ilDB'],
55  $dic["repo.Operations"],
56  $dic["repo.OperationContexts"]
57  );
58  $dic['ui.factory'] = static fn(): \ILIAS\UI\Factory => $DIC['ui.factory'];
59  $dic['ui.renderer'] = static fn(): \ILIAS\UI\Renderer => $DIC['ui.renderer'];
60  $dic['query'] = static fn(): \ILIAS\HTTP\Wrapper\RequestWrapper => $DIC['http']->wrapper()->query();
61  $dic['refinery'] = static fn(): \ILIAS\Refinery\Factory => $DIC['refinery'];
62  $dic['access'] = static fn(): \ilAccessHandler => $DIC['ilAccess'];
63  $dic['lng'] = static fn(): \ilLanguage => $DIC['lng'];
64  $dic['dropdownbuilder'] = static fn($d): \ILIAS\Modules\OrgUnit\ARHelper\DropdownBuilder =>
65  new \ILIAS\Modules\OrgUnit\ARHelper\DropdownBuilder(
66  $d['ui.factory'],
67  $d['ui.renderer'],
68  $d['lng']
69  );
70 
71  $dic['ctrl'] = static fn(): \ilCtrl => $DIC['ilCtrl'];
72  $dic['tabs'] = static fn(): \ilTabsGUI => $DIC['ilTabs'];
73  $dic['resource_storage'] = static fn(): \ILIAS\ResourceStorage\Services => $DIC['resource_storage'];
74  return $dic;
75  }
76 }
An entity that renders components to a string output.
Definition: Renderer.php:30
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 is to construct/collect the entries (=Links) of a row&#39;s action-dropdown.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
This is how the factory for UI elements looks.
Definition: Factory.php:37
Interface RequestWrapper.
Builds data types.
Definition: Factory.php:35
$dic
Definition: result.php:32
language handling