ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
class.InternalDomainService.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
21 namespace ILIAS\LearningModule;
22 
25 use ilLMTree;
27 
29 {
31 
32  protected static array $instance = [];
33 
34  public function __construct(
36  protected InternalRepoService $repo,
37  protected InternalDataService $data
38  ) {
39  $this->initDomainServices($DIC);
40  }
41 
42  public function lmTree(int $lm_id): \ilLMTree
43  {
44  return self::$instance["tree"][$lm_id] ??= new \ilLMTree($lm_id);
45  }
46 
47  public function subObjectRetrieval(
48  int $lm_id,
49  string $type,
50  int $current_node,
51  string $lang
52  ): SubObjectRetrieval {
53  return self::$instance["sub_obj_retrieval"][$lm_id][$type][$current_node] ??=
54  new SubObjectRetrieval(
55  $this->lmTree($lm_id),
56  $type,
57  $current_node,
58  $lang
59  );
60  }
61 
62 }
initDomainServices(\ILIAS\DI\Container $DIC)
Learning modules internal repo service.
subObjectRetrieval(int $lm_id, string $type, int $current_node, string $lang)
Learning modules internal data service.
global $DIC
Definition: shib_login.php:25
__construct(Container $DIC, protected InternalRepoService $repo, protected InternalDataService $data)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...