ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.InternalDomainService.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\MediaPool;
22 
28 
30 {
32  protected static array $instance = [];
33  protected Container $dic;
34 
35  public function __construct(
37  protected InternalRepoService $repo_service,
38  protected InternalDataService $data_service
39  ) {
40  $this->dic = $DIC;
41  $this->initDomainServices($DIC);
42  }
43 
44  public function clipboard(): Clipboard\ClipboardManager
45  {
46  return self::$instance["clipboard"] ??= new Clipboard\ClipboardManager(
47  $this->repo_service->clipboard()
48  );
49  }
50 
51  public function mediapool(int $obj_id): MediaPoolManager
52  {
53  return self::$instance["mediapool"][$obj_id] ??= new MediaPoolManager(
54  $this,
55  $obj_id
56  );
57  }
58 
59  public function tree(int $mep_obj_id): MediaPoolTree
60  {
61  return self::$instance["tree"][$mep_obj_id] ??= new MediaPoolTree($mep_obj_id);
62  }
63 
64  public function metadata(): MetadataManager
65  {
66  return self::$instance["metadata"] ??= new MetadataManager($this->learningObjectMetadata());
67  }
68 
69  public function mediapoolSettings(): SettingsManager
70  {
71  return self::$instance["settings"] ??= new SettingsManager(
72  $this->data_service,
73  $this->repo_service,
74  $this
75  );
76  }
77 
78 }
initDomainServices(\ILIAS\DI\Container $DIC)
__construct(Container $DIC, protected InternalRepoService $repo_service, protected InternalDataService $data_service)
Repository internal data service.
global $DIC
Definition: shib_login.php:22
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...