ILIAS  trunk Revision v12.0_alpha-1227-g7ff6d300864
class.InternalDomainService.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\LearningModule;
22
27
29{
30 use GlobalDICDomainServices;
31
32 protected static array $instance = [];
33
34 public function __construct(
36 protected InternalRepoService $repo,
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 ): Editing\SubObjectRetrieval {
53 return self::$instance["sub_obj_retrieval"][$lm_id][$type][$current_node] ??=
54 new Editing\SubObjectRetrieval(
55 $this->lmTree($lm_id),
56 $type,
57 $current_node,
58 $lang
59 );
60 }
61
62 public function translation(int $lm_id): Translations
63 {
64 return (new CachedRepository($this->database()))->getFor($lm_id);
65 }
66
67}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:36
Class handles translation mode for an object.
Learning modules internal data service.
__construct(Container $DIC, protected InternalRepoService $repo, protected InternalDataService $data)
subObjectRetrieval(int $lm_id, string $type, int $current_node, string $lang)
Learning modules internal repo service.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initDomainServices(\ILIAS\DI\Container $DIC)
global $DIC
Definition: shib_login.php:26