ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.InternalDomainService.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\LearningModule;
22 
25 
27 {
29 
30  protected static array $instance = [];
31 
32  public function __construct(
34  protected InternalRepoService $repo,
35  protected InternalDataService $data
36  ) {
37  $this->initDomainServices($DIC);
38  }
39 
40  public function lmTree(int $lm_id): \ilLMTree
41  {
42  return self::$instance["tree"][$lm_id] ??= new \ilLMTree($lm_id);
43  }
44 
45  public function subObjectRetrieval(
46  int $lm_id,
47  string $type,
48  int $current_node,
49  string $lang
50  ): Editing\SubObjectRetrieval {
51  return self::$instance["sub_obj_retrieval"][$lm_id][$type][$current_node] ??=
52  new Editing\SubObjectRetrieval(
53  $this->lmTree($lm_id),
54  $type,
55  $current_node,
56  $lang
57  );
58  }
59 
60 }
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:26
__construct(Container $DIC, protected InternalRepoService $repo, protected InternalDataService $data)
$lang
Definition: xapiexit.php:25
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...