ILIAS  trunk Revision v13.0_alpha-52-g21c366bbdd4
class.InternalDomainService.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\COPage;
22
32
34{
35 use GlobalDICDomainServices;
36
37 protected ?\ilLogger $copg_log = null;
41
42 public function __construct(
46 ) {
47 $this->repo_service = $repo_service;
48 $this->data_service = $data_service;
49 $this->initDomainServices($DIC);
50 }
51
52 public function pc(?PCDefinition $def = null): PC\DomainService
53 {
54 return new PC\DomainService(
55 $this->data_service,
56 $this->repo_service,
57 $this,
58 $def
59 );
60 }
61
62 public function history(): History\HistoryManager
63 {
64 return new History\HistoryManager(
65 $this->data_service,
66 $this->repo_service,
67 $this
68 );
69 }
70
71 public function historyRetrieval(int $page_id, string $parent_type, string $lang): History\HistoryRetrieval
72 {
73 return new History\HistoryRetrieval(
74 $this->repo_service->history(),
75 $this->DIC->database(),
76 $page_id,
77 $parent_type,
78 $lang
79 );
80 }
81
82 public function xsl(): Xsl\XslManager
83 {
84 return new Xsl\XslManager();
85 }
86
87 public function domUtil(): Dom\DomUtil
88 {
89 return new Dom\DomUtil();
90 }
91
92 public function page(): Page\PageManagerInterface
93 {
94 return $this->page_manager ??= new Page\PageManager(
95 $this->repo_service->page(),
96 $this->domUtil(),
97 $this->profile()
98 );
99 }
100
101 public function pageConfig(string $parent_type): \ilPageConfig
102 {
104 $class = $def["class_name"] . "Config";
105 $cfg = new $class();
106 return $cfg;
107 }
108
109 public function htmlTransformUtil(): Html\TransformUtil
110 {
111 return new Html\TransformUtil();
112 }
113
114 public function contentIds(\ilPageObject $page): ID\ContentIdManager
115 {
116 return new ID\ContentIdManager($page);
117 }
118
119 public function contentIdGenerator(): ID\ContentIdGenerator
120 {
121 return new ID\ContentIdGenerator();
122 }
123
124 public function compare(): PageCompare
125 {
126 return new PageCompare();
127 }
128
133 public function wordDiff(array $original_lines, array $closing_lines): WordDiff
134 {
135 return new WordDiff($original_lines, $closing_lines);
136 }
137
138 public function link(): LinkManager
139 {
140 return new LinkManager();
141 }
142
143 public function style(): StyleManager
144 {
145 return new StyleManager();
146 }
147
148 public function log(): ?\ilLogger
149 {
150 if (isset($this->DIC["ilLoggerFactory"])) {
151 if (is_null($this->copg_log)) {
152 $this->copg_log = $this->logger()->copg();
153 }
154 return $this->copg_log;
155 }
156 return null;
157 }
158
159 public function layoutRetrieval(): Layout\PageLayoutRetrieval
160 {
161 return new Layout\PageLayoutRetrieval();
162 }
163
164 public function testQuestion(): \ILIAS\TestQuestionPool\Questions\PublicInterface
165 {
166 return $this->DIC->testQuestion();
167 }
168
170 {
171 return $this->DIC['component.factory'];
172 }
173}
Repository internal data service.
historyRetrieval(int $page_id, string $parent_type, string $lang)
__construct(Container $DIC, InternalRepoService $repo_service, InternalDataService $data_service)
wordDiff(array $original_lines, array $closing_lines)
Repository internal repo service.
Creates word-level marked-up versions of two text sequences.
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:38
static getDefinitionByParentType(string $a_parent_type)
Get definition by parent type.
Component logger with individual log levels by component id.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initDomainServices(\ILIAS\DI\Container $DIC)
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
global $DIC
Definition: shib_login.php:26