53 $this->lng =
$DIC->language();
57 $this->legacy_content_template =
new PageContentGUI(
"tpl.page_content.html",
true,
true);
58 $this->il_settings =
$DIC->settings();
64 $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"'));
65 $this->
http->saveResponse($this->
http->response()->withAddedHeader(
'Content-type',
'text/html; charset=UTF-8'));
67 if (defined(
"ILIAS_HTTP_PATH")) {
77 $this->gs->layout()->meta()->addJs(
"./Services/JavaScript/js/Basic.js",
true, 1);
88 $sessionReminder->populatePage();
91 $onScreenNotifier->populatePage();
105 public function printToStdout($part =
"DEFAULT", $a_fill_tabs =
true, $a_skip_main_menu =
false)
111 PageContentProvider::setContent($this->legacy_content_template->renderPage(
"DEFAULT",
true,
false));
112 print $this->
ui->renderer()->render($this->gs->collector()->layout()->getFinalPage());
131 PageContentProvider::setContent($this->legacy_content_template->renderPage(
"DEFAULT",
true,
false));
133 return $this->
ui->renderer()->render($this->gs->collector()->layout()->getFinalPage());
145 public function addJavaScript($a_js_file, $a_add_version_parameter =
true, $a_batch = 2)
147 $this->gs->layout()->meta()->addJs($a_js_file, $a_add_version_parameter, $a_batch);
154 public function addCss($a_css_file, $media =
"screen")
156 $this->gs->layout()->meta()->addCss($a_css_file, $media);
165 $this->gs->layout()->meta()->addOnloadCode($a_code, $a_batch);
174 $this->gs->layout()->meta()->addInlineCss($a_css, $media);
186 $this->legacy_content_template->setMainContent($a_html);
195 $this->legacy_content_template->setLeftContent($a_html);
204 $this->legacy_content_template->setRightContent($a_html);
215 $this->legacy_content_template->setFilter($filter);
225 public function setTitle($a_title, $hidden =
false)
227 $this->legacy_content_template->setTitle((
string) $a_title, $hidden);
229 $short_title = (string) $this->il_settings->get(
'short_inst_name');
230 if (trim($short_title) ===
"") {
231 $short_title =
'ILIAS';
234 PageContentProvider::setShortTitle($short_title);
235 PageContentProvider::setViewTitle((
string) $a_title);
236 $header_title = ilObjSystemFolder::_getHeaderTitle();
237 PageContentProvider::setTitle($header_title);
246 $this->legacy_content_template->setTitleDesc($a_descr);
255 $this->legacy_content_template->setIconPath($a_icon_path);
256 $this->legacy_content_template->setIconDesc($a_icon_desc);
262 $this->legacy_content_template->setBanner($img_src);
273 $this->legacy_content_template->setTitleAlerts($a_props);
282 $this->legacy_content_template->setOnScreenMessage(
$a_type, $a_txt, $a_keep);
293 $this->legacy_content_template->setEnableFileupload((
int) $a_ref_id);
302 $this->legacy_content_template->setHeaderAction($a_header);
311 $this->legacy_content_template->setHeaderPageTitle($a_title);
320 $this->legacy_content_template->addLightbox($a_html, $a_id);
329 $this->legacy_content_template->setPageFormAction($a_action);
338 $this->legacy_content_template->setAdminPanelCommandsToolbar($toolb);
339 $this->legacy_content_template->setAdminPanelArrow($a_arrow);
340 $this->legacy_content_template->setAdminPanelBottom($a_bottom_panel);
355 if ($variable ===
"LOCATION_CONTENT_STYLESHEET" || $variable ===
"LOCATION_SYNTAX_STYLESHEET") {
360 $this->legacy_content_template->setVariable($variable, $value);
369 $this->gs->layout()->meta()->getJs()->clear();
376 public function get($part =
"DEFAULT")
378 return $this->legacy_content_template->get($part);
387 if (in_array($blockname, self::$ignored_blocks)) {
392 $this->legacy_content_template->setCurrentBlock($blockname);
404 if (in_array($blockname, self::$ignored_blocks)) {
408 $this->legacy_content_template->touchBlock($blockname);
420 if (in_array($blockname, self::$ignored_blocks)) {
424 return $this->legacy_content_template->parseCurrentBlock($blockname);
434 public function addBlockFile($var, $block, $tplname, $in_module =
false)
437 $this->legacy_content_template->removeBlockData($block);
440 return $this->legacy_content_template->addBlockFile($var, $block, $tplname, $in_module);
449 if (in_array($blockname, self::$ignored_blocks)) {
453 return $this->legacy_content_template->blockExists($blockname);
487 PageContentProvider::setPermaLink($href);
546 foreach ($this->gs->layout()->meta()->getOnLoadCode()->getItemsInOrderOfDelivery() as $code) {
547 $js .= $code->getContent() .
"\n";
550 return '<script type="text/javascript">' .
"\n" .
606 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)
617 if (((substr(strrchr(
$_SERVER[
"PHP_SELF"],
"/"), 1) !=
"error.php")
618 && (substr(strrchr(
$_SERVER[
"PHP_SELF"],
"/"), 1) !=
"adm_menu.php")
619 && (substr(strrchr(
$_SERVER[
"PHP_SELF"],
"/"), 1) !=
"chat.php"))) {
624 $url_parts = @parse_url(
$_SERVER[
"REQUEST_URI"]);
626 $protocol = (isset(
$_SERVER[
'HTTPS']) ?
'https' :
'http') .
'://';
629 $url_parts = @parse_url($protocol . $host . $path);
632 if (isset($url_parts[
"query"]) && preg_match(
"/cmd=gateway/", $url_parts[
"query"]) && (isset(
$_POST[
"cmd"][
"create"]))) {
633 foreach (
$_POST as $key => $val) {
634 if (is_array($val)) {
638 $str .=
"&" . $key .
"=" . $val;
641 $_SESSION[
"referer"] = preg_replace(
"/cmd=gateway/", substr($str, 1),
$_SERVER[
"REQUEST_URI"]);
643 } elseif (isset($url_parts[
"query"]) && preg_match(
"/cmd=post/", $url_parts[
"query"]) && (isset(
$_POST[
"cmd"][
"create"]))) {
644 foreach (
$_POST as $key => $val) {
645 if (is_array($val)) {
649 $str .=
"&" . $key .
"=" . $val;
652 $_SESSION[
"referer"] = preg_replace(
"/cmd=post/", substr($str, 1),
$_SERVER[
"REQUEST_URI"]);
653 if (isset(
$_GET[
'ref_id'])) {
660 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 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.