20declare(strict_types=1);
63 $this->
lng = $DIC->language();
67 $this->legacy_content_template =
new PageContentGUI(
"tpl.page_content.html",
true,
true);
68 $this->il_settings =
$DIC->settings();
74 $this->
http->saveResponse(
75 $this->
http->response()->withAddedHeader(
77 'CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"'
81 $this->
http->saveResponse(
82 $this->
http->response()->withAddedHeader(
'Content-type',
'text/html; charset=UTF-8')
85 if (defined(
"ILIAS_HTTP_PATH")) {
86 $this->gs->layout()->meta()->setBaseURL(
87 (substr(ILIAS_HTTP_PATH, -1) ===
'/' ? ILIAS_HTTP_PATH : ILIAS_HTTP_PATH .
'/')
91 $this->gs->layout()->meta()->setTextDirection($this->
lng->getTextDirection());
101 $this->gs->layout()->meta()->addJs(
"./Services/JavaScript/js/Basic.js",
true, 1);
105 GlobalPageHandler::initPage($this);
113 $sessionReminder->populatePage();
115 $onScreenNotifier->populatePage();
125 string $part = self::DEFAULT_BLOCK,
126 bool $a_fill_tabs =
true,
127 bool $a_skip_main_menu =
false
133 PageContentProvider::setContent($this->legacy_content_template->renderPage(self::DEFAULT_BLOCK,
true));
134 $this->
http->sendResponse();
136 print $this->
ui->renderer()->render($this->gs->collector()->layout()->getFinalPage());
144 $this->prepareOutputHeaders();
145 $this->prepareBasicJS();
146 $this->prepareBasicCSS();
148 PageContentProvider::setContent($this->legacy_content_template->renderPage(self::DEFAULT_BLOCK,
true));
150 return $this->
ui->renderer()->render($this->gs->collector()->layout()->getFinalPage());
153 public function addJavaScript(
string $a_js_file,
bool $a_add_version_parameter =
true,
int $a_batch = 2): void
155 $this->gs->layout()->meta()->addJs($a_js_file, $a_add_version_parameter, $a_batch);
158 public function addCss(
string $a_css_file,
string $media =
"screen"): void
160 $this->gs->layout()->meta()->addCss($a_css_file, $media);
165 $this->gs->layout()->meta()->addOnloadCode($a_code, $a_batch);
168 public function addInlineCss(
string $a_css,
string $media =
"screen"): void
170 $this->gs->layout()->meta()->addInlineCss($a_css, $media);
175 $this->legacy_content_template->setMainContent($a_html);
180 $this->legacy_content_template->setLeftContent($a_html);
185 $this->legacy_content_template->setRightContent($a_html);
190 $this->legacy_content_template->setFilter($filter);
193 public function setTitle(
string $a_title,
bool $hidden =
false): void
195 $this->legacy_content_template->setTitle($a_title, $hidden);
197 $short_title = (string) $this->il_settings->get(
'short_inst_name');
198 if (trim($short_title) ===
"") {
199 $short_title =
'ILIAS';
202 PageContentProvider::setShortTitle($short_title);
203 PageContentProvider::setViewTitle($a_title);
204 $header_title = ilObjSystemFolder::_getHeaderTitle();
205 PageContentProvider::setTitle($header_title);
210 $this->legacy_content_template->setTitleDesc($a_descr);
213 public function setTitleIcon(
string $a_icon_path,
string $a_icon_desc =
""): void
215 $this->legacy_content_template->setIconPath($a_icon_path);
216 $this->legacy_content_template->setIconDesc($a_icon_desc);
221 $this->legacy_content_template->setBanner($img_src);
226 $this->legacy_content_template->setTitleAlerts($a_props);
231 $this->legacy_content_template->setOnScreenMessage($a_type, $a_txt, $a_keep);
236 $this->legacy_content_template->setFileUploadRefId($a_ref_id);
241 $this->legacy_content_template->setHeaderAction($a_header);
246 PageContentProvider::setViewTitle($a_title);
251 $this->legacy_content_template->addLightbox($a_html, $a_id);
256 $this->legacy_content_template->setPageFormAction($a_action);
261 $this->legacy_content_template->setAdminPanelCommandsToolbar($toolb);
262 $this->legacy_content_template->setAdminPanelArrow($a_arrow);
263 $this->legacy_content_template->setAdminPanelBottom($a_bottom_panel);
268 if ($variable ===
"LOCATION_CONTENT_STYLESHEET" || $variable ===
"LOCATION_SYNTAX_STYLESHEET") {
269 $this->addCss($value);
274 $this->legacy_content_template->setVariable(
276 $this->
refinery->kindlyTo()->string()->transform($value)
282 $this->gs->layout()->meta()->getJs()->clear();
285 public function get(
string $part = self::DEFAULT_BLOCK):
string
287 return $this->legacy_content_template->get($part);
292 if (in_array($blockname, self::$ignored_blocks)) {
296 if ($this->blockExists($blockname)) {
297 return $this->legacy_content_template->setCurrentBlock($blockname);
304 if (in_array($blockname, self::$ignored_blocks)) {
308 if ($this->blockExists($blockname)) {
309 $this->legacy_content_template->touchBlock($blockname);
318 if (in_array($blockname, self::$ignored_blocks)) {
321 if ($this->blockExists($blockname)) {
322 return $this->legacy_content_template->parseCurrentBlock($blockname);
328 public function addBlockFile(
string $var,
string $block,
string $template_name,
string $in_module =
null): bool
330 if ($this->blockExists($block)) {
331 $this->legacy_content_template->removeBlockData($block);
334 return $this->legacy_content_template->addBlockFile($var, $block, $template_name, $in_module);
339 if (in_array($blockname, self::$ignored_blocks)) {
343 return $this->legacy_content_template->blockExists($blockname);
359 string $a_append =
"",
360 string $a_target =
"",
363 $href =
ilLink::_getStaticLink($a_id, $a_type,
true, $a_append);
364 PageContentProvider::setPermaLink($href);
396 foreach ($this->gs->layout()->meta()->getOnLoadCode()->getItemsInOrderOfDelivery() as $code) {
397 $js .= $code->getContent() .
"\n";
400 return '<script type="text/javascript">' .
"\n" .
422 public function setTabs(
string $a_tabs_html): void
433 string $part = self::DEFAULT_BLOCK,
434 bool $add_error_mess =
false,
435 bool $handle_referer =
false,
436 bool $add_ilias_footer =
false,
437 bool $add_standard_elements =
false,
438 bool $a_main_menu =
true,
Inits the global page template for screen reade focus.
Provides fluid interface to RBAC services.
This exception indicates that an UI component was accepted by the JF but is not backed by a real impl...
static initializeFrontend(ilGlobalTemplateInterface $page)
setLeftContent(string $a_html)
Sets content of left column.
fillJavaScriptFiles(bool $a_force=false)
Probably adds javascript files.
printToString()
Use this method to get the finally rendered page as string.
resetHeaderBlock(bool $a_reset_header_action=true)
Reset all header properties: title, icon, description, alerts, action menu.
setContent(string $a_html)
Sets content for standard template.
setPermanentLink(string $a_type, ?int $a_id, string $a_append="", string $a_target="", string $a_title="")
Generates and sets a permanent ilias link.
setHeaderPageTitle(string $a_title)
Sets the title of the page (for browser window).
setAlertProperties(array $a_props)
Set alert properties.
setCurrentBlock(string $blockname=self::DEFAULT_BLOCK)
Sets the template to the given block.
__construct(Services $gs, UIServices $ui, HTTPServices $http)
@inheritDoc
setBanner(string $img_src)
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
setBodyClass(string $a_class="")
Sets the body-tags class.
printToStdout(string $part=self::DEFAULT_BLOCK, bool $a_fill_tabs=true, bool $a_skip_main_menu=false)
setLeftNavContent(string $a_content)
Sets content of left navigation column.
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.
PageContentGUI $legacy_content_template
setSubTabs(string $a_tabs_html)
sets subtabs in standard template
addLightbox(string $a_html, string $a_id)
Add a lightbox html to the template.
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.
setLocator()
Insert locator.
setTreeFlatIcon(string $a_link, string $a_mode)
Sets a tree or flat icon.
setDescription(string $a_descr)
Sets description below title in standard template.
addBlockFile(string $var, string $block, string $template_name, string $in_module=null)
overwrites ITX::addBlockFile
setVariable(string $variable, $value='')
Sets the given variable to the given value.
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.
setPageFormAction(string $a_action)
Sets the pages form action.
setOnScreenMessage(string $a_type, string $a_txt, bool $a_keep=false)
Set a message to be displayed to the user.
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
parseCurrentBlock(string $blockname=self::DEFAULT_BLOCK)
Parses the given block.
addAdminPanelToolbar(ilToolbarGUI $toolb, bool $a_bottom_panel=true, bool $a_arrow=false)
Add admin panel commands as toolbar.
setTabs(string $a_tabs_html)
sets tabs in standard template
clearHeader()
Clear header.
setHeaderActionMenu(string $a_header)
Set header action menu.
setRightContent(string $a_html)
Sets content of right column.
getOnLoadCodeForAsynch()
Get js onload code for ajax calls.
addInlineCss(string $a_css, string $media="screen")
Add a css file that should be included in the header.
setFileUploadRefId(int $a_ref_id)
Enables the file upload into this object by dropping a file.
touchBlock(string $blockname)
overwrites ITX::touchBlock.
setFilter(string $filter)
resetJavascript()
Reset javascript files.
hideFooter()
Make the template hide the footer.
static array $ignored_blocks
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
setLoginTargetPar(string $a_val)
Set target parameter for login (public sector).
blockExists(string $blockname)
check if block exists in actual template
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _saveUsages()
Store the collected language variable usages in the user session This should be called as late as pos...
static initializeFrontend(ilGlobalTemplateInterface $page)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static init(ilGlobalTemplateInterface $template=null)
static getStyleSheetLocation(string $mode="output", string $a_css_name="", string $a_css_location="")
get full style sheet file name (path inclusive) of current user
static getNewContentStyleSheetLocation(string $mode="output")
get full style sheet file name (path inclusive) of current user
static initjQueryUI(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components....
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static http()
Fetches the global http state from ILIAS.