ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
GlobalTemplate.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\UICore;
22
27{
28 public const MESSAGE_TYPE_FAILURE = 'failure';
29 public const MESSAGE_TYPE_SUCCESS = "success";
30 public const MESSAGE_TYPE_QUESTION = "question";
31 public const MESSAGE_TYPE_INFO = "info";
32
36 public const MESSAGE_TYPES = [
41 ];
42
46 public const DEFAULT_BLOCK = 'DEFAULT';
47
51 public function hideFooter(): void;
52
57 public function setOnScreenMessage(string $type, string $a_txt, bool $a_keep = false): void;
58
62 public function addJavaScript(string $a_js_file, bool $a_add_version_parameter = true, int $a_batch = 2): void;
63
67 public function addOnLoadCode(string $a_code, int $a_batch = 2): void;
68
72 public function getOnLoadCodeForAsynch(): string;
73
77 public function resetJavascript(): void;
78
82 public function fillJavaScriptFiles(bool $a_force = false): void;
83
87 public function addCss(string $a_css_file, string $media = "screen"): void;
88
92 public function addInlineCss(string $a_css, string $media = "screen"): void;
93
97 public function setBodyClass(string $a_class = ""): void;
98
104 public function loadStandardTemplate(): void;
105
110 public function setTitle(string $a_title, bool $hidden = false): void;
111
115 public function setDescription(string $a_descr): void;
116
120 public function setTitleIcon(string $a_icon_path, string $a_icon_desc = ""): void;
121
126 public function setAlertProperties(array $alerts): void;
127
131 public function clearHeader(): void;
132
136 public function setHeaderActionMenu(string $a_header): void;
137
141 public function setHeaderPageTitle(string $a_title): void;
142
146 public function setLocator(): void;
147
151 public function setTabs(string $a_tabs_html): void;
152
156 public function setSubTabs(string $a_tabs_html): void;
157
161 public function setContent(string $a_html): void;
162
166 public function setLeftContent(string $a_html): void;
167
171 public function setLeftNavContent(string $a_content): void;
172
176 public function setRightContent(string $a_html): void;
177
181 public function setPageFormAction(string $a_action): void;
182
187 public function setLoginTargetPar(string $a_val): void;
188
192 public function getSpecial(
193 string $part = self::DEFAULT_BLOCK,
194 bool $add_error_mess = false,
195 bool $handle_referer = false,
196 bool $add_ilias_footer = false,
197 bool $add_standard_elements = false,
198 bool $a_main_menu = true,
199 bool $a_tabs = true
200 ): string;
201
206 public function printToStdout(
207 string $part = self::DEFAULT_BLOCK,
208 bool $has_tabs = true,
209 bool $skip_main_menu = false
210 ): void;
211
215 public function printToString(): string;
216
221 public function setTreeFlatIcon(string $a_link, string $a_mode): void;
222
228 public function addAdminPanelToolbar(
229 \ilToolbarGUI $toolbar,
230 bool $is_bottom_panel = true,
231 bool $has_arrow = false
232 ): void;
233
237 public function setPermanentLink(
238 string $a_type,
239 ?int $a_id,
240 string $a_append = "",
241 string $a_target = "",
242 string $a_title = ""
243 ): void;
244
248 public function resetHeaderBlock(bool $a_reset_header_action = true): void;
249
253 public function setFileUploadRefId(int $a_ref_id): void;
254
258 public function get(string $part = self::DEFAULT_BLOCK): string;
259
264 public function setVariable(string $variable, $value = ''): void;
265
269 public function setCurrentBlock(string $part = self::DEFAULT_BLOCK): bool;
270
274 public function parseCurrentBlock(string $block_name = self::DEFAULT_BLOCK): bool;
275
279 public function touchBlock(string $block): bool;
280
284 public function addBlockFile(string $var, string $block, string $template_name, ?string $in_module = null): bool;
285
290 public function blockExists(string $block_name): bool;
291}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
resetJavascript()
Reset javascript files.
setLocator()
Insert locator.
setDescription(string $a_descr)
Sets description below title in standard template.
setLeftContent(string $a_html)
Sets content of left column.
printToString()
Use this method to get the finally rendered page as string.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
setLeftNavContent(string $a_content)
Sets content of left navigation column.
touchBlock(string $block)
overwrites ITX::touchBlock.
setFileUploadRefId(int $a_ref_id)
Enables the file upload into this object by dropping a file.
loadStandardTemplate()
This loads the standard template "tpl.adm_content.html" and "tpl.statusline.html" the CONTENT and STA...
setSubTabs(string $a_tabs_html)
sets subtabs in standard template
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.
addInlineCss(string $a_css, string $media="screen")
Add a css file that should be included in the header.
setTabs(string $a_tabs_html)
sets tabs in standard template
hideFooter()
Make the template hide the footer.
setPermanentLink(string $a_type, ?int $a_id, string $a_append="", string $a_target="", string $a_title="")
Generates and sets a permanent ilias link.
setPageFormAction(string $a_action)
Sets the pages form action.
setBodyClass(string $a_class="")
Sets the body-tags class.
addBlockFile(string $var, string $block, string $template_name, ?string $in_module=null)
overwrites ITX::addBlockFile
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setRightContent(string $a_html)
Sets content of right column.
setTreeFlatIcon(string $a_link, string $a_mode)
Sets a tree or flat icon.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
blockExists(string $block_name)
check if block exists in actual template
setHeaderPageTitle(string $a_title)
Sets the title of the page (for browser window).
fillJavaScriptFiles(bool $a_force=false)
Probably adds javascript files.
setAlertProperties(array $alerts)
Set alert properties.
getOnLoadCodeForAsynch()
Get js onload code for ajax calls.
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.
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
setOnScreenMessage(string $type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
clearHeader()
Clear header.
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
setLoginTargetPar(string $a_val)
Set target parameter for login (public sector).
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
addAdminPanelToolbar(\ilToolbarGUI $toolbar, bool $is_bottom_panel=true, bool $has_arrow=false)
Add admin panel commands as toolbar.
resetHeaderBlock(bool $a_reset_header_action=true)
Reset all header properties: title, icon, description, alerts, action menu.
setHeaderActionMenu(string $a_header)
Set header action menu.
setContent(string $a_html)
Sets content for standard template.
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.