72 $this->lng =
$DIC->language();
76 $this->legacy_content_template =
new PageContentGUI(
"tpl.page_content.html",
true,
true);
77 $this->il_settings =
$DIC->settings();
83 $this->
http->saveResponse($this->
http->response()->withAddedHeader(
'P3P',
'CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"'));
84 $this->
http->saveResponse($this->
http->response()->withAddedHeader(
'Content-type',
'text/html; charset=UTF-8'));
86 if (defined(
"ILIAS_HTTP_PATH")) {
87 $this->gs->layout()->meta()->setBaseURL((substr(ILIAS_HTTP_PATH, -1) ==
'/' ? ILIAS_HTTP_PATH : ILIAS_HTTP_PATH .
'/'));
89 $this->gs->layout()->meta()->setTextDirection($this->lng->getTextDirection());
97 $this->gs->layout()->meta()->addJs(
"./Services/JavaScript/js/Basic.js",
true, 1);
109 $sessionReminder->populatePage();
112 $onScreenNotifier->populatePage();
126 public function printToStdout($part =
"DEFAULT", $a_fill_tabs =
true, $a_skip_main_menu =
false)
132 $this->
http->sendResponse();
134 PageContentProvider::setContent($this->legacy_content_template->renderPage(
"DEFAULT",
true,
false));
135 print $this->
ui->renderer()->render($this->gs->collector()->layout()->getFinalPage());
154 PageContentProvider::setContent($this->legacy_content_template->renderPage(
"DEFAULT",
true,
false));
156 return $this->
ui->renderer()->render($this->gs->collector()->layout()->getFinalPage());
168 public function addJavaScript($a_js_file, $a_add_version_parameter =
true, $a_batch = 2)
170 $this->gs->layout()->meta()->addJs($a_js_file, $a_add_version_parameter, $a_batch);
177 public function addCss($a_css_file, $media =
"screen")
179 $this->gs->layout()->meta()->addCss($a_css_file, $media);
188 $this->gs->layout()->meta()->addOnloadCode($a_code, $a_batch);
197 $this->gs->layout()->meta()->addInlineCss($a_css, $media);
209 $this->legacy_content_template->setMainContent($a_html);
218 $this->legacy_content_template->setLeftContent($a_html);
227 $this->legacy_content_template->setRightContent($a_html);
238 $this->legacy_content_template->setFilter($filter);
248 public function setTitle($a_title, $hidden =
false)
250 $this->legacy_content_template->setTitle((
string) $a_title, $hidden);
252 $short_title = (string) $this->il_settings->get(
'short_inst_name');
253 if (trim($short_title) ===
"") {
254 $short_title =
'ILIAS';
257 PageContentProvider::setShortTitle($short_title);
258 PageContentProvider::setViewTitle((
string) $a_title);
259 $header_title = ilObjSystemFolder::_getHeaderTitle();
260 PageContentProvider::setTitle($header_title);
269 $this->legacy_content_template->setTitleDesc($a_descr);
278 $this->legacy_content_template->setIconPath($a_icon_path);
279 $this->legacy_content_template->setIconDesc($a_icon_desc);
285 $this->legacy_content_template->setBanner($img_src);
296 $this->legacy_content_template->setTitleAlerts($a_props);
305 $this->legacy_content_template->setOnScreenMessage($a_type, $a_txt, $a_keep);
316 $this->legacy_content_template->setEnableFileupload((
int) $a_ref_id);
325 $this->legacy_content_template->setHeaderAction($a_header);
334 PageContentProvider::setViewTitle($a_title);
343 $this->legacy_content_template->addLightbox($a_html, $a_id);
352 $this->legacy_content_template->setPageFormAction($a_action);
361 $this->legacy_content_template->setAdminPanelCommandsToolbar($toolb);
362 $this->legacy_content_template->setAdminPanelArrow($a_arrow);
363 $this->legacy_content_template->setAdminPanelBottom($a_bottom_panel);
378 if ($variable ===
"LOCATION_CONTENT_STYLESHEET" || $variable ===
"LOCATION_SYNTAX_STYLESHEET") {
383 $this->legacy_content_template->setVariable($variable, $value);
392 $this->gs->layout()->meta()->getJs()->clear();
399 public function get($part =
"DEFAULT")
401 return $this->legacy_content_template->get($part);
410 if (in_array($blockname, self::$ignored_blocks)) {
415 $this->legacy_content_template->setCurrentBlock($blockname);
427 if (in_array($blockname, self::$ignored_blocks)) {
431 $this->legacy_content_template->touchBlock($blockname);
443 if (in_array($blockname, self::$ignored_blocks)) {
447 return $this->legacy_content_template->parseCurrentBlock($blockname);
457 public function addBlockFile($var, $block, $tplname, $in_module =
false)
460 $this->legacy_content_template->removeBlockData($block);
463 return $this->legacy_content_template->addBlockFile($var, $block, $tplname, $in_module);
472 if (in_array($blockname, self::$ignored_blocks)) {
476 return $this->legacy_content_template->blockExists($blockname);
507 public function setPermanentLink($a_type, $a_id, $a_append =
"", $a_target =
"", $a_title =
"")
510 PageContentProvider::setPermaLink($href);
569 foreach ($this->gs->layout()->meta()->getOnLoadCode()->getItemsInOrderOfDelivery() as $code) {
570 $js .= $code->getContent() .
"\n";
573 return '<script type="text/javascript">' .
"\n" .
629 public function getSpecial($part =
"DEFAULT", $add_error_mess =
false, $handle_referer =
false, $add_ilias_footer =
false, $add_standard_elements =
false, $a_main_menu =
true, $a_tabs =
true)
640 if (((substr(strrchr(
$_SERVER[
"PHP_SELF"],
"/"), 1) !=
"error.php")
641 && (substr(strrchr(
$_SERVER[
"PHP_SELF"],
"/"), 1) !=
"adm_menu.php")
642 && (substr(strrchr(
$_SERVER[
"PHP_SELF"],
"/"), 1) !=
"chat.php"))) {
645 $url_parts = @parse_url(
$_SERVER[
"REQUEST_URI"]);
647 $protocol = (isset(
$_SERVER[
'HTTPS']) ?
'https' :
'http') .
'://';
650 $url_parts = @parse_url($protocol . $host . $path);
653 if (isset($url_parts[
"query"]) && preg_match(
"/cmd=gateway/", $url_parts[
"query"]) && (isset(
$_POST[
"cmd"][
"create"]))) {
654 foreach (
$_POST as $key => $val) {
655 if (is_array($val)) {
659 $str .=
"&" . $key .
"=" . $val;
662 $_SESSION[
"referer"] = preg_replace(
"/cmd=gateway/", substr($str, 1),
$_SERVER[
"REQUEST_URI"]);
664 } elseif (isset($url_parts[
"query"]) && preg_match(
"/cmd=post/", $url_parts[
"query"]) && (isset(
$_POST[
"cmd"][
"create"]))) {
665 foreach (
$_POST as $key => $val) {
666 if (is_array($val)) {
670 $str .=
"&" . $key .
"=" . $val;
673 $_SESSION[
"referer"] = preg_replace(
"/cmd=post/", substr($str, 1),
$_SERVER[
"REQUEST_URI"]);
674 if (isset(
$_GET[
'ref_id'])) {
681 if (isset(
$_GET[
'ref_id'])) {
An exception for terminatinating execution or to throw for unit testing.
static initPage(\ilGlobalTemplateInterface $page)
Provides an interface to the ILIAS HTTP services.
Provides fluid interface to RBAC services.
Class ilPageContentProvider.
This exception indicates that an UI component was accepted by the JF but is not backed by a real impl...
static initializeFrontend(ilGlobalTemplateInterface $page)
Class ilGlobalPageTemplate.
printToString()
@inheritDoc
enableDragDropFileUpload($a_ref_id)
@inheritDoc
addInlineCss($a_css, $media="screen")
@inheritDoc
addJavaScript($a_js_file, $a_add_version_parameter=true, $a_batch=2)
@inheritDoc
blockExists($blockname)
@inheritDoc
setHeaderActionMenu($a_header)
@inheritDoc
setTitleIcon($a_icon_path, $a_icon_desc="")
@inheritDoc
setAlertProperties(array $a_props)
@inheritDoc
__construct(Services $gs, UIServices $ui, HTTPServices $http)
@inheritDoc
addAdminPanelToolbar(ilToolbarGUI $toolb, $a_bottom_panel=true, $a_arrow=false)
@inheritDoc
handleReferer()
Old method from global template fixing #26968.
setBanner(string $img_src)
addCss($a_css_file, $media="screen")
@inheritDoc
addOnLoadCode($a_code, $a_batch=2)
@inheritDoc
setDescription($a_descr)
@inheritDoc
setSubTabs($a_tabs_html)
@inheritDoc
setTreeFlatIcon($a_link, $a_mode)
@inheritDoc
setRightContent($a_html)
@inheritDoc
setContent($a_html)
@inheritDoc
touchBlock($blockname)
@inheritDoc
setPermanentLink($a_type, $a_id, $a_append="", $a_target="", $a_title="")
@inheritDoc
loadStandardTemplate()
@inheritDoc
addLightbox($a_html, $a_id)
@inheritDoc
setBodyClass($a_class="")
@inheritDoc
setTabs($a_tabs_html)
@inheritDoc
setLoginTargetPar($a_val)
@inheritDoc
setPageFormAction($a_action)
fillJavaScriptFiles($a_force=false)
setVariable($variable, $value='')
setLeftContent($a_html)
@inheritDoc
addBlockFile($var, $block, $tplname, $in_module=false)
@inheritDoc
setCurrentBlock($blockname="DEFAULT")
@inheritDoc
getSpecial($part="DEFAULT", $add_error_mess=false, $handle_referer=false, $add_ilias_footer=false, $add_standard_elements=false, $a_main_menu=true, $a_tabs=true)
@inheritDoc
resetHeaderBlock($a_reset_header_action=true)
@inheritDoc
setLeftNavContent($a_content)
@inheritDoc
printToStdout($part="DEFAULT", $a_fill_tabs=true, $a_skip_main_menu=false)
@inheritDoc
setOnScreenMessage($a_type, $a_txt, $a_keep=false)
@inheritDoc
getOnLoadCodeForAsynch()
@inheritDoc
parseCurrentBlock($blockname="DEFAULT")
@inheritDoc
setFilter(string $filter)
resetJavascript()
@inheritDoc
setHeaderPageTitle($a_title)
@inheritDoc
setTitle($a_title, $hidden=false)
@inheritDoc
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
Class ilNotificationOSDGUI.
static _saveUsages()
Store the collected language variable usages in the user session This should be called as late as pos...
static initializeFrontend(ilGlobalTemplateInterface $page)
Initialize frontend and delivers required javascript files and configuration to the global template.
static createInstanceWithCurrentUserSession()
static init(ilGlobalTemplateInterface $a_tpl=null)
Init.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static getNewContentStyleSheetLocation($mode="output")
get full style sheet file name (path inclusive) of current user
static initConnection(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
static initjQueryUI($a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components....
static http()
Fetches the global http state from ILIAS.
Class ilAsqQuestionAuthoringFactory.