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'])) {
setOnScreenMessage($a_type, $a_txt, $a_keep=false)
addJavaScript($a_js_file, $a_add_version_parameter=true, $a_batch=2)
fillJavaScriptFiles($a_force=false)
setTreeFlatIcon($a_link, $a_mode)
__construct(Services $gs, UIServices $ui, HTTPServices $http)
static createInstanceWithCurrentUserSession()
setLoginTargetPar($a_val)
setPermanentLink($a_type, $a_id, $a_append="", $a_target="", $a_title="")
setCurrentBlock($blockname="DEFAULT")
setAlertProperties(array $a_props)
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
Class ilNotificationOSDGUI.
setBodyClass($a_class="")
setTitleIcon($a_icon_path, $a_icon_desc="")
addBlockFile($var, $block, $tplname, $in_module=false)
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
parseCurrentBlock($blockname="DEFAULT")
static getNewContentStyleSheetLocation($mode="output")
get full style sheet file name (path inclusive) of current user
setFilter(string $filter)
static initializeFrontend(ilGlobalTemplateInterface $page)
Initialize frontend and delivers required javascript files and configuration to the global template...
This exception indicates that an UI component was accepted by the JF but is not backed by a real impl...
handleReferer()
Old method from global template fixing #26968.
setBanner(string $img_src)
setPageFormAction($a_action)
enableDragDropFileUpload($a_ref_id)
Provides an interface to the ILIAS HTTP services.
Provides fluid interface to RBAC services.
setLeftNavContent($a_content)
static http()
Fetches the global http state from ILIAS.
Class ilGlobalPageTemplate.
addLightbox($a_html, $a_id)
static initializeFrontend(ilGlobalTemplateInterface $page)
static initPage(\ilGlobalTemplateInterface $page)
addCss($a_css_file, $media="screen")
setVariable($variable, $value='')
static initjQueryUI($a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components.txt for included components)
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)
setTitle($a_title, $hidden=false)
resetHeaderBlock($a_reset_header_action=true)
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
static init(ilGlobalTemplateInterface $a_tpl=null)
Init.
addInlineCss($a_css, $media="screen")
setHeaderActionMenu($a_header)
static _saveUsages()
Store the collected language variable usages in the user session This should be called as late as pos...
addOnLoadCode($a_code, $a_batch=2)
setHeaderPageTitle($a_title)
printToStdout($part="DEFAULT", $a_fill_tabs=true, $a_skip_main_menu=false)
Class ilAsqQuestionAuthoringFactory.
addAdminPanelToolbar(ilToolbarGUI $toolb, $a_bottom_panel=true, $a_arrow=false)