ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
GlobalTemplateLegacyInitialisationAdapter.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\UICore;
22
24use ilToolbarGUI;
25
27{
28 public function hideFooter(): void
29 {
30 $this->getLegacyGlobalTemplateInstance()->hideFooter();
31 }
32
33 public function setOnScreenMessage(string $type, string $a_txt, bool $a_keep = false): void
34 {
35 $this->getLegacyGlobalTemplateInstance()->setOnScreenMessage($type, $a_txt, $a_keep);
36 }
37
38 public function addJavaScript(string $a_js_file, bool $a_add_version_parameter = true, int $a_batch = 2): void
39 {
40 $this->getLegacyGlobalTemplateInstance()->addJavaScript($a_js_file, $a_add_version_parameter, $a_batch);
41 }
42
43 public function addOnLoadCode(string $a_code, int $a_batch = 2): void
44 {
45 $this->getLegacyGlobalTemplateInstance()->addOnLoadCode($a_code, $a_batch);
46 }
47
48 public function getOnLoadCodeForAsynch(): string
49 {
50 return $this->getLegacyGlobalTemplateInstance()->getOnLoadCodeForAsynch();
51 }
52
53 public function resetJavascript(): void
54 {
55 $this->getLegacyGlobalTemplateInstance()->resetJavascript();
56 }
57
58 public function fillJavaScriptFiles(bool $a_force = false): void
59 {
60 $this->getLegacyGlobalTemplateInstance()->fillJavaScriptFiles($a_force);
61 }
62
63 public function addCss(string $a_css_file, string $media = "screen"): void
64 {
65 $this->getLegacyGlobalTemplateInstance()->addCss($a_css_file, $media);
66 }
67
68 public function addInlineCss(string $a_css, string $media = "screen"): void
69 {
70 $this->getLegacyGlobalTemplateInstance()->addInlineCss($a_css, $media);
71 }
72
73 public function setBodyClass(string $a_class = ""): void
74 {
75 $this->getLegacyGlobalTemplateInstance()->setBodyClass($a_class);
76 }
77
78 public function loadStandardTemplate(): void
79 {
80 $this->getLegacyGlobalTemplateInstance()->loadStandardTemplate();
81 }
82
83 public function setTitle(string $a_title, bool $hidden = false): void
84 {
85 $this->getLegacyGlobalTemplateInstance()->setTitle($a_title, $hidden);
86 }
87
88 public function setDescription(string $a_descr): void
89 {
90 $this->getLegacyGlobalTemplateInstance()->setDescription($a_descr);
91 }
92
93 public function setTitleIcon(string $a_icon_path, string $a_icon_desc = ""): void
94 {
95 $this->getLegacyGlobalTemplateInstance()->setTitleIcon($a_icon_path, $a_icon_desc);
96 }
97
98 public function setAlertProperties(array $alerts): void
99 {
100 $this->getLegacyGlobalTemplateInstance()->setAlertProperties($alerts);
101 }
102
103 public function clearHeader(): void
104 {
105 $this->getLegacyGlobalTemplateInstance()->clearHeader();
106 }
107
108 public function setHeaderActionMenu(string $a_header): void
109 {
110 $this->getLegacyGlobalTemplateInstance()->setHeaderActionMenu($a_header);
111 }
112
113 public function setHeaderPageTitle(string $a_title): void
114 {
115 $this->getLegacyGlobalTemplateInstance()->setHeaderPageTitle($a_title);
116 }
117
118 public function setLocator(): void
119 {
120 $this->getLegacyGlobalTemplateInstance()->setLocator();
121 }
122
123 public function setTabs(string $a_tabs_html): void
124 {
125 $this->getLegacyGlobalTemplateInstance()->setTabs($a_tabs_html);
126 }
127
128 public function setSubTabs(string $a_tabs_html): void
129 {
130 $this->getLegacyGlobalTemplateInstance()->setSubTabs($a_tabs_html);
131 }
132
133 public function setContent(string $a_html): void
134 {
135 $this->getLegacyGlobalTemplateInstance()->setContent($a_html);
136 }
137
138 public function setLeftContent(string $a_html): void
139 {
140 $this->getLegacyGlobalTemplateInstance()->setLeftContent($a_html);
141 }
142
143 public function setLeftNavContent(string $a_content): void
144 {
145 $this->getLegacyGlobalTemplateInstance()->setLeftNavContent($a_content);
146 }
147
148 public function setRightContent(string $a_html): void
149 {
150 $this->getLegacyGlobalTemplateInstance()->setRightContent($a_html);
151 }
152
153 public function setPageFormAction(string $a_action): void
154 {
155 $this->getLegacyGlobalTemplateInstance()->setPageFormAction($a_action);
156 }
157
158 public function setLoginTargetPar(string $a_val): void
159 {
160 $this->getLegacyGlobalTemplateInstance()->setLoginTargetPar($a_val);
161 }
162
163 public function getSpecial(
164 string $part = self::DEFAULT_BLOCK,
165 bool $add_error_mess = false,
166 bool $handle_referer = false,
167 bool $add_ilias_footer = false,
168 bool $add_standard_elements = false,
169 bool $a_main_menu = true,
170 bool $a_tabs = true
171 ): string {
173 $part,
174 $add_error_mess,
175 $handle_referer,
176 $add_ilias_footer,
177 $add_standard_elements,
178 $a_main_menu,
179 $a_tabs
180 );
181 }
182
183 public function printToStdout(
184 string $part = self::DEFAULT_BLOCK,
185 bool $has_tabs = true,
186 bool $skip_main_menu = false
187 ): void {
188 $this->getLegacyGlobalTemplateInstance()->printToStdout($part, $has_tabs, $skip_main_menu);
189 }
190
191 public function printToString(): string
192 {
193 return $this->getLegacyGlobalTemplateInstance()->printToString();
194 }
195
196 public function setTreeFlatIcon(string $a_link, string $a_mode): void
197 {
198 $this->getLegacyGlobalTemplateInstance()->setTreeFlatIcon($a_link, $a_mode);
199 }
200
201 public function addAdminPanelToolbar(
202 ilToolbarGUI $toolbar,
203 bool $is_bottom_panel = true,
204 bool $has_arrow = false
205 ): void {
206 $this->getLegacyGlobalTemplateInstance()->addAdminPanelToolbar($toolbar, $is_bottom_panel, $has_arrow);
207 }
208
209 public function setPermanentLink(
210 string $a_type,
211 ?int $a_id,
212 string $a_append = "",
213 string $a_target = "",
214 string $a_title = ""
215 ): void {
216 $this->getLegacyGlobalTemplateInstance()->setPermanentLink($a_type, $a_id, $a_append, $a_target, $a_title);
217 }
218
219 public function resetHeaderBlock(bool $a_reset_header_action = true): void
220 {
221 $this->getLegacyGlobalTemplateInstance()->resetHeaderBlock($a_reset_header_action);
222 }
223
224 public function setFileUploadRefId(int $a_ref_id): void
225 {
226 $this->getLegacyGlobalTemplateInstance()->setFileUploadRefId($a_ref_id);
227 }
228
229 public function get(string $part = self::DEFAULT_BLOCK): string
230 {
231 return $this->getLegacyGlobalTemplateInstance()->get($part);
232 }
233
234 public function setVariable(string $variable, $value = ''): void
235 {
236 $this->getLegacyGlobalTemplateInstance()->setVariable($variable, $value);
237 }
238
239 public function setCurrentBlock(string $part = self::DEFAULT_BLOCK): bool
240 {
241 return $this->getLegacyGlobalTemplateInstance()->setCurrentBlock($part);
242 }
243
244 public function parseCurrentBlock(string $block_name = self::DEFAULT_BLOCK): bool
245 {
246 return $this->getLegacyGlobalTemplateInstance()->parseCurrentBlock($block_name);
247 }
248
249 public function touchBlock(string $block): bool
250 {
251 return $this->getLegacyGlobalTemplateInstance()->touchBlock($block);
252 }
253
254 public function addBlockFile(string $var, string $block, string $template_name, ?string $in_module = null): bool
255 {
256 return $this->getLegacyGlobalTemplateInstance()->addBlockFile($var, $block, $template_name, $in_module);
257 }
258
259 public function blockExists(string $block_name): bool
260 {
261 return $this->getLegacyGlobalTemplateInstance()->blockExists($block_name);
262 }
263
265 {
266 global $DIC;
267 return $DIC->ui()->mainTemplate();
268 }
269}
blockExists(string $block_name)
check if block exists in actual template
setPermanentLink(string $a_type, ?int $a_id, string $a_append="", string $a_target="", string $a_title="")
Generates and sets a permanent ilias link.
addBlockFile(string $var, string $block, string $template_name, ?string $in_module=null)
overwrites ITX::addBlockFile
loadStandardTemplate()
This loads the standard template "tpl.adm_content.html" and "tpl.statusline.html" the CONTENT and STA...
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
setHeaderPageTitle(string $a_title)
Sets the title of the page (for browser window).
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
setTreeFlatIcon(string $a_link, string $a_mode)
Sets a tree or flat icon.
setSubTabs(string $a_tabs_html)
sets subtabs in standard template
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
resetHeaderBlock(bool $a_reset_header_action=true)
Reset all header properties: title, icon, description, alerts, action menu.
setDescription(string $a_descr)
Sets description below title in standard template.
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
addAdminPanelToolbar(ilToolbarGUI $toolbar, bool $is_bottom_panel=true, bool $has_arrow=false)
addInlineCss(string $a_css, string $media="screen")
Add a css file that should be included in the header.
fillJavaScriptFiles(bool $a_force=false)
Probably adds javascript files.
setLeftNavContent(string $a_content)
Sets content of left navigation column.
setFileUploadRefId(int $a_ref_id)
Enables the file upload into this object by dropping a file.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
printToString()
Use this method to get the finally rendered page as string.
setLoginTargetPar(string $a_val)
Set target parameter for login (public sector).
getSpecial(string $part=self::DEFAULT_BLOCK, bool $add_error_mess=false, bool $handle_referer=false, bool $add_ilias_footer=false, bool $add_standard_elements=false, bool $a_main_menu=true, bool $a_tabs=true)
Renders the page with specific elements enabled.
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...
global $DIC
Definition: shib_login.php:26