ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilGlobalPageTemplate Class Reference

Class ilGlobalPageTemplate. More...

+ Inheritance diagram for ilGlobalPageTemplate:
+ Collaboration diagram for ilGlobalPageTemplate:

Public Member Functions

 __construct (Services $gs, UIServices $ui, HTTPServices $http)
 @inheritDoc More...
 
 printToStdout ($part="DEFAULT", $a_fill_tabs=true, $a_skip_main_menu=false)
 @inheritDoc More...
 
 printToString ()
 @inheritDoc More...
 
 addJavaScript ($a_js_file, $a_add_version_parameter=true, $a_batch=2)
 @inheritDoc More...
 
 addCss ($a_css_file, $media="screen")
 @inheritDoc More...
 
 addOnLoadCode ($a_code, $a_batch=2)
 @inheritDoc More...
 
 addInlineCss ($a_css, $media="screen")
 @inheritDoc More...
 
 setContent ($a_html)
 @inheritDoc More...
 
 setLeftContent ($a_html)
 @inheritDoc More...
 
 setRightContent ($a_html)
 @inheritDoc More...
 
 setFilter (string $filter)
 
 setTitle ($a_title, $hidden=false)
 @inheritDoc More...
 
 setDescription ($a_descr)
 @inheritDoc More...
 
 setTitleIcon ($a_icon_path, $a_icon_desc="")
 @inheritDoc More...
 
 setBanner (string $img_src)
 
 setAlertProperties (array $a_props)
 @inheritDoc More...
 
 setOnScreenMessage ($a_type, $a_txt, $a_keep=false)
 @inheritDoc More...
 
 enableDragDropFileUpload ($a_ref_id)
 @inheritDoc More...
 
 setHeaderActionMenu ($a_header)
 @inheritDoc More...
 
 setHeaderPageTitle ($a_title)
 @inheritDoc More...
 
 addLightbox ($a_html, $a_id)
 @inheritDoc More...
 
 setPageFormAction ($a_action)
 
 addAdminPanelToolbar (ilToolbarGUI $toolb, $a_bottom_panel=true, $a_arrow=false)
 @inheritDoc More...
 
 setVariable ($variable, $value='')
 
 resetJavascript ()
 @inheritDoc More...
 
 get ($part="DEFAULT")
 @inheritDoc More...
 
 setCurrentBlock ($blockname="DEFAULT")
 @inheritDoc More...
 
 touchBlock ($blockname)
 @inheritDoc More...
 
 parseCurrentBlock ($blockname="DEFAULT")
 @inheritDoc More...
 
 addBlockFile ($var, $block, $tplname, $in_module=false)
 @inheritDoc More...
 
 blockExists ($blockname)
 @inheritDoc More...
 
 loadStandardTemplate ()
 @inheritDoc More...
 
 setLocator ()
 @inheritDoc More...
 
 setPermanentLink ($a_type, $a_id, $a_append="", $a_target="", $a_title="")
 @inheritDoc More...
 
 setTreeFlatIcon ($a_link, $a_mode)
 @inheritDoc More...
 
 hideFooter ()
 @inheritDoc More...
 
 setLeftNavContent ($a_content)
 @inheritDoc More...
 
 resetHeaderBlock ($a_reset_header_action=true)
 @inheritDoc More...
 
 setLoginTargetPar ($a_val)
 @inheritDoc More...
 
 getOnLoadCodeForAsynch ()
 @inheritDoc More...
 
 fillJavaScriptFiles ($a_force=false)
 
 setBodyClass ($a_class="")
 @inheritDoc More...
 
 clearHeader ()
 @inheritDoc More...
 
 setTabs ($a_tabs_html)
 @inheritDoc More...
 
 setSubTabs ($a_tabs_html)
 @inheritDoc More...
 
 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 More...
 
 hideFooter ()
 Make the template hide the footer. More...
 
 setOnScreenMessage ($a_type, $a_txt, $a_keep=false)
 Set a message to be displayed to the user. More...
 
 addJavaScript ($a_js_file, $a_add_version_parameter=true, $a_batch=2)
 Add a javascript file that should be included in the header. More...
 
 addOnLoadCode ($a_code, $a_batch=2)
 Add on load code. More...
 
 getOnLoadCodeForAsynch ()
 Get js onload code for ajax calls. More...
 
 resetJavascript ()
 Reset javascript files. More...
 
 fillJavaScriptFiles ($a_force=false)
 
 addCss ($a_css_file, $media="screen")
 Add a css file that should be included in the header. More...
 
 addInlineCss ($a_css, $media="screen")
 Add a css file that should be included in the header. More...
 
 setBodyClass ($a_class="")
 
 loadStandardTemplate ()
 This loads the standard template "tpl.adm_content.html" and "tpl.statusline.html" the CONTENT and STATUSLINE placeholders if they are not already loaded. More...
 
 setTitle ($a_title, $hidden=false)
 Sets title in standard template. More...
 
 setDescription ($a_descr)
 Sets descripton below title in standard template. More...
 
 setTitleIcon ($a_icon_path, $a_icon_desc="")
 set title icon More...
 
 setAlertProperties (array $a_props)
 Set alert properties. More...
 
 clearHeader ()
 Clear header. More...
 
 setHeaderActionMenu ($a_header)
 Set header action menu. More...
 
 setHeaderPageTitle ($a_title)
 Sets the title of the page (for browser window). More...
 
 setLocator ()
 Insert locator. More...
 
 setTabs ($a_tabs_html)
 sets tabs in standard template More...
 
 setSubTabs ($a_tabs_html)
 sets subtabs in standard template More...
 
 setContent ($a_html)
 Sets content for standard template. More...
 
 setLeftContent ($a_html)
 Sets content of left column. More...
 
 setLeftNavContent ($a_content)
 Sets content of left navigation column. More...
 
 setRightContent ($a_html)
 Sets content of right column. More...
 
 setPageFormAction ($a_action)
 
 setLoginTargetPar ($a_val)
 Set target parameter for login (public sector). More...
 
 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)
 
 printToStdout ($part="DEFAULT", $a_fill_tabs=true, $a_skip_main_menu=false)
 
 printToString ()
 Use this method to get the finally rendered page as string. More...
 
 setTreeFlatIcon ($a_link, $a_mode)
 set tree/flat icon More...
 
 addLightbox ($a_html, $a_id)
 Add lightbox html. More...
 
 addAdminPanelToolbar (ilToolbarGUI $toolb, $a_bottom_panel=true, $a_arrow=false)
 Add admin panel commands as toolbar. More...
 
 setPermanentLink ($a_type, $a_id, $a_append="", $a_target="", $a_title="")
 
 resetHeaderBlock ($a_reset_header_action=true)
 Reset all header properties: title, icon, description, alerts, action menu. More...
 
 enableDragDropFileUpload ($a_ref_id)
 Enables the file upload into this object by dropping a file. More...
 
 get ($part="DEFAULT")
 
 setVariable ($variable, $value='')
 
 setCurrentBlock ($part="DEFAULT")
 @access public More...
 
 touchBlock ($block)
 overwrites ITX::touchBlock. More...
 
 parseCurrentBlock ($part="DEFAULT")
 Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt. More...
 
 addBlockFile ($var, $block, $tplname, $in_module=false)
 overwrites ITX::addBlockFile More...
 
 blockExists ($a_blockname)
 check if block exists in actual template More...
 

Private Member Functions

 prepareOutputHeaders ()
 
 prepareBasicJS ()
 
 prepareBasicCSS ()
 
 handleReferer ()
 Old method from global template fixing #26968. More...
 

Private Attributes

 $http
 
 $gs
 
 $ui
 
 $legacy_content_template
 
 $lng
 

Static Private Attributes

static $ignored_blocks = ['ContentStyle', "DEFAULT", "SyntaxStyle", ""]
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilGlobalPageTemplate::__construct ( Services  $gs,
UIServices  $ui,
HTTPServices  $http 
)

@inheritDoc

Definition at line 50 of file class.ilGlobalPageTemplate.php.

51 {
52 global $DIC;
53 $this->lng = $DIC->language();
54 $this->ui = $ui;
55 $this->gs = $gs;
56 $this->http = $http;
57 $this->legacy_content_template = new PageContentGUI("tpl.page_content.html", true, true);
58 $this->il_settings = $DIC->settings();
59 }
static http()
Fetches the global http state from ILIAS.
ui()
Definition: ui.php:5
$DIC
Definition: xapitoken.php:46

References $DIC, $gs, $http, $ui, ILIAS\FileDelivery\http(), and ui().

+ Here is the call graph for this function:

Member Function Documentation

◆ addAdminPanelToolbar()

ilGlobalPageTemplate::addAdminPanelToolbar ( ilToolbarGUI  $toolb,
  $a_bottom_panel = true,
  $a_arrow = false 
)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 336 of file class.ilGlobalPageTemplate.php.

337 {
338 $this->legacy_content_template->setAdminPanelCommandsToolbar($toolb);
339 $this->legacy_content_template->setAdminPanelArrow($a_arrow);
340 $this->legacy_content_template->setAdminPanelBottom($a_bottom_panel);
341 }

◆ addBlockFile()

ilGlobalPageTemplate::addBlockFile (   $var,
  $block,
  $tplname,
  $in_module = false 
)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 434 of file class.ilGlobalPageTemplate.php.

435 {
436 if ($this->blockExists($block)) {
437 $this->legacy_content_template->removeBlockData($block);
438 }
439
440 return $this->legacy_content_template->addBlockFile($var, $block, $tplname, $in_module);
441 }
blockExists($blockname)
@inheritDoc

References blockExists().

+ Here is the call graph for this function:

◆ addCss()

ilGlobalPageTemplate::addCss (   $a_css_file,
  $media = "screen" 
)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 154 of file class.ilGlobalPageTemplate.php.

155 {
156 $this->gs->layout()->meta()->addCss($a_css_file, $media);
157 }

Referenced by setVariable().

+ Here is the caller graph for this function:

◆ addInlineCss()

ilGlobalPageTemplate::addInlineCss (   $a_css,
  $media = "screen" 
)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 172 of file class.ilGlobalPageTemplate.php.

173 {
174 $this->gs->layout()->meta()->addInlineCss($a_css, $media);
175 }

◆ addJavaScript()

ilGlobalPageTemplate::addJavaScript (   $a_js_file,
  $a_add_version_parameter = true,
  $a_batch = 2 
)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 145 of file class.ilGlobalPageTemplate.php.

146 {
147 $this->gs->layout()->meta()->addJs($a_js_file, $a_add_version_parameter, $a_batch);
148 }

Referenced by ilTermsOfServiceAcceptanceHistoryTableGUI\__construct().

+ Here is the caller graph for this function:

◆ addLightbox()

ilGlobalPageTemplate::addLightbox (   $a_html,
  $a_id 
)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 318 of file class.ilGlobalPageTemplate.php.

319 { //
320 $this->legacy_content_template->addLightbox($a_html, $a_id);
321 }

◆ addOnLoadCode()

ilGlobalPageTemplate::addOnLoadCode (   $a_code,
  $a_batch = 2 
)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 163 of file class.ilGlobalPageTemplate.php.

164 {
165 $this->gs->layout()->meta()->addOnloadCode($a_code, $a_batch);
166 }

◆ blockExists()

ilGlobalPageTemplate::blockExists (   $blockname)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 447 of file class.ilGlobalPageTemplate.php.

448 {
449 if (in_array($blockname, self::$ignored_blocks)) {
450 return false; // TODO why is this needed?
451 }
452
453 return $this->legacy_content_template->blockExists($blockname);
454 }

Referenced by addBlockFile(), parseCurrentBlock(), setCurrentBlock(), and touchBlock().

+ Here is the caller graph for this function:

◆ clearHeader()

ilGlobalPageTemplate::clearHeader ( )

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 579 of file class.ilGlobalPageTemplate.php.

580 {
581 throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
582 }
This exception indicates that an UI component was accepted by the JF but is not backed by a real impl...

◆ enableDragDropFileUpload()

ilGlobalPageTemplate::enableDragDropFileUpload (   $a_ref_id)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 291 of file class.ilGlobalPageTemplate.php.

292 {
293 $this->legacy_content_template->setEnableFileupload((int) $a_ref_id);
294 }

◆ fillJavaScriptFiles()

ilGlobalPageTemplate::fillJavaScriptFiles (   $a_force = false)
Parameters
bool$a_force

Implements ilGlobalTemplateInterface.

Definition at line 561 of file class.ilGlobalPageTemplate.php.

562 {
563 throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
564 }

◆ get()

ilGlobalPageTemplate::get (   $part = "DEFAULT")

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 376 of file class.ilGlobalPageTemplate.php.

377 {
378 return $this->legacy_content_template->get($part);
379 }

◆ getOnLoadCodeForAsynch()

ilGlobalPageTemplate::getOnLoadCodeForAsynch ( )

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 542 of file class.ilGlobalPageTemplate.php.

543 {
544 // see e.g. bug #26413
545 $js = "";
546 foreach ($this->gs->layout()->meta()->getOnLoadCode()->getItemsInOrderOfDelivery() as $code) {
547 $js .= $code->getContent() . "\n";
548 }
549 if ($js) {
550 return '<script type="text/javascript">' . "\n" .
551 $js .
552 '</script>' . "\n";
553 }
554 return "";
555 }

◆ getSpecial()

ilGlobalPageTemplate::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

Implements ilGlobalTemplateInterface.

Definition at line 606 of file class.ilGlobalPageTemplate.php.

607 { //
608 throw new NotImplementedException();
609 }

◆ handleReferer()

ilGlobalPageTemplate::handleReferer ( )
private

Old method from global template fixing #26968.

Definition at line 615 of file class.ilGlobalPageTemplate.php.

616 {
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"))) {
620 $_SESSION["post_vars"] = $_POST;
621
622 // referer is modified if query string contains cmd=gateway and $_POST is not empty.
623 // this is a workaround to display formular again in case of error and if the referer points to another page
624 $url_parts = @parse_url($_SERVER["REQUEST_URI"]);
625 if (!$url_parts) {
626 $protocol = (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://';
627 $host = $_SERVER['HTTP_HOST'];
628 $path = $_SERVER['REQUEST_URI'];
629 $url_parts = @parse_url($protocol . $host . $path);
630 }
631
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)) {
635 $val = key($val);
636 }
637
638 $str .= "&" . $key . "=" . $val;
639 }
640
641 $_SESSION["referer"] = preg_replace("/cmd=gateway/", substr($str, 1), $_SERVER["REQUEST_URI"]);
642 $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
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)) {
646 $val = key($val);
647 }
648
649 $str .= "&" . $key . "=" . $val;
650 }
651
652 $_SESSION["referer"] = preg_replace("/cmd=post/", substr($str, 1), $_SERVER["REQUEST_URI"]);
653 if (isset($_GET['ref_id'])) {
654 $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
655 } else {
656 $_SESSION['referer_ref_id'] = 0;
657 }
658 } else {
659 $_SESSION["referer"] = $_SERVER["REQUEST_URI"];
660 if (isset($_GET['ref_id'])) {
661 $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
662 } else {
663 $_SESSION['referer_ref_id'] = 0;
664 }
665 }
666
667 unset($_SESSION["error_post_vars"]);
668 }
669 }
$_GET["client_id"]
$_POST["username"]
$_SESSION["AccountId"]
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10

References $_GET, $_POST, $_SERVER, and $_SESSION.

Referenced by printToStdout().

+ Here is the caller graph for this function:

◆ hideFooter()

ilGlobalPageTemplate::hideFooter ( )

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 503 of file class.ilGlobalPageTemplate.php.

504 {
505 // Nothing to do
506 }

◆ loadStandardTemplate()

ilGlobalPageTemplate::loadStandardTemplate ( )

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 466 of file class.ilGlobalPageTemplate.php.

467 {
468 // Nothing to do
469 }

◆ parseCurrentBlock()

ilGlobalPageTemplate::parseCurrentBlock (   $blockname = "DEFAULT")

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 418 of file class.ilGlobalPageTemplate.php.

419 {
420 if (in_array($blockname, self::$ignored_blocks)) {
421 return; // TODO why is this needed?
422 }
423 if ($this->blockExists($blockname)) {
424 return $this->legacy_content_template->parseCurrentBlock($blockname);
425 } else {
426 throw new ilTemplateException("block " . var_export($blockname, true) . " not found");
427 }
428 }

References blockExists().

+ Here is the call graph for this function:

◆ prepareBasicCSS()

ilGlobalPageTemplate::prepareBasicCSS ( )
private

Definition at line 95 of file class.ilGlobalPageTemplate.php.

96 {
97 $this->gs->layout()->meta()->addCss(\ilUtil::getStyleSheetLocation());
98 $this->gs->layout()->meta()->addCss(\ilUtil::getNewContentStyleSheetLocation());
99 }
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

References ilUtil\getNewContentStyleSheetLocation(), and ilUtil\getStyleSheetLocation().

Referenced by printToStdout(), and printToString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareBasicJS()

ilGlobalPageTemplate::prepareBasicJS ( )
private

Definition at line 73 of file class.ilGlobalPageTemplate.php.

74 {
77 $this->gs->layout()->meta()->addJs("./Services/JavaScript/js/Basic.js", true, 1);
82
83 $sessionReminder = new ilSessionReminderGUI(
85 $this,
86 $this->lng
87 );
88 $sessionReminder->populatePage();
89
90 $onScreenNotifier = new ilNotificationOSDGUI($this, $this->lng);
91 $onScreenNotifier->populatePage();
92 }
static initPage(\ilGlobalTemplateInterface $page)
static initializeFrontend(ilGlobalTemplateInterface $page)
Class ilNotificationOSDGUI.
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 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....

References ilSessionReminder\createInstanceWithCurrentUserSession(), ilUIFramework\init(), ilBuddySystemGUI\initializeFrontend(), ilOnScreenChatGUI\initializeFrontend(), iljQueryUtil\initjQuery(), iljQueryUtil\initjQueryUI(), and ILIAS\Accessibility\GlobalPageHandler\initPage().

Referenced by printToStdout(), and printToString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareOutputHeaders()

ilGlobalPageTemplate::prepareOutputHeaders ( )
private

Definition at line 62 of file class.ilGlobalPageTemplate.php.

63 {
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'));
66
67 if (defined("ILIAS_HTTP_PATH")) {
68 $this->gs->layout()->meta()->setBaseURL((substr(ILIAS_HTTP_PATH, -1) == '/' ? ILIAS_HTTP_PATH : ILIAS_HTTP_PATH . '/'));
69 }
70 }

References ILIAS\FileDelivery\http(), and ILIAS_HTTP_PATH.

Referenced by printToStdout(), and printToString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printToStdout()

ilGlobalPageTemplate::printToStdout (   $part = "DEFAULT",
  $a_fill_tabs = true,
  $a_skip_main_menu = false 
)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 105 of file class.ilGlobalPageTemplate.php.

106 {
107 $this->prepareOutputHeaders();
108 $this->prepareBasicJS();
109 $this->prepareBasicCSS();
110
111 PageContentProvider::setContent($this->legacy_content_template->renderPage("DEFAULT", true, false));
112 print $this->ui->renderer()->render($this->gs->collector()->layout()->getFinalPage());
113
114 // save language usages as late as possible
116
117 // see #26968
118 $this->handleReferer();
119 }
if(! $in) print
handleReferer()
Old method from global template fixing #26968.
static _saveUsages()
Store the collected language variable usages in the user session This should be called as late as pos...

References ilObjLanguageAccess\_saveUsages(), handleReferer(), prepareBasicCSS(), prepareBasicJS(), prepareOutputHeaders(), print, and ui().

+ Here is the call graph for this function:

◆ printToString()

ilGlobalPageTemplate::printToString ( )

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 125 of file class.ilGlobalPageTemplate.php.

125 : string
126 {
127 $this->prepareOutputHeaders();
128 $this->prepareBasicJS();
129 $this->prepareBasicCSS();
130
131 PageContentProvider::setContent($this->legacy_content_template->renderPage("DEFAULT", true, false));
132
133 return $this->ui->renderer()->render($this->gs->collector()->layout()->getFinalPage());
134 }

References prepareBasicCSS(), prepareBasicJS(), prepareOutputHeaders(), and ui().

Referenced by ILIAS\Blog\Export\BlogHtmlExport\writeExportFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetHeaderBlock()

ilGlobalPageTemplate::resetHeaderBlock (   $a_reset_header_action = true)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 521 of file class.ilGlobalPageTemplate.php.

522 {
523 // Nothing to do
524 }

◆ resetJavascript()

ilGlobalPageTemplate::resetJavascript ( )

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 367 of file class.ilGlobalPageTemplate.php.

368 {
369 $this->gs->layout()->meta()->getJs()->clear();
370 }

◆ setAlertProperties()

ilGlobalPageTemplate::setAlertProperties ( array  $a_props)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 271 of file class.ilGlobalPageTemplate.php.

272 {
273 $this->legacy_content_template->setTitleAlerts($a_props);
274 }

◆ setBanner()

ilGlobalPageTemplate::setBanner ( string  $img_src)

Definition at line 260 of file class.ilGlobalPageTemplate.php.

261 {
262 $this->legacy_content_template->setBanner($img_src);
263 }

◆ setBodyClass()

ilGlobalPageTemplate::setBodyClass (   $a_class = "")

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 570 of file class.ilGlobalPageTemplate.php.

571 {
572 throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
573 }

◆ setContent()

ilGlobalPageTemplate::setContent (   $a_html)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 184 of file class.ilGlobalPageTemplate.php.

185 {
186 $this->legacy_content_template->setMainContent($a_html);
187 }

Referenced by ILIAS\Blog\Export\BlogHtmlExport\writeExportFile().

+ Here is the caller graph for this function:

◆ setCurrentBlock()

ilGlobalPageTemplate::setCurrentBlock (   $blockname = "DEFAULT")

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 385 of file class.ilGlobalPageTemplate.php.

386 {
387 if (in_array($blockname, self::$ignored_blocks)) {
388 return; // TODO why is this needed?
389 }
390
391 if ($this->blockExists($blockname)) {
392 $this->legacy_content_template->setCurrentBlock($blockname);
393 } else {
394 throw new ilTemplateException("block " . var_export($blockname, true) . " not found");
395 }
396 }

References blockExists().

+ Here is the call graph for this function:

◆ setDescription()

ilGlobalPageTemplate::setDescription (   $a_descr)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 244 of file class.ilGlobalPageTemplate.php.

245 {
246 $this->legacy_content_template->setTitleDesc($a_descr);
247 }

◆ setFilter()

ilGlobalPageTemplate::setFilter ( string  $filter)
Parameters
string$filter

Definition at line 213 of file class.ilGlobalPageTemplate.php.

214 {
215 $this->legacy_content_template->setFilter($filter);
216 }

◆ setHeaderActionMenu()

ilGlobalPageTemplate::setHeaderActionMenu (   $a_header)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 300 of file class.ilGlobalPageTemplate.php.

301 {
302 $this->legacy_content_template->setHeaderAction($a_header);
303 }

◆ setHeaderPageTitle()

ilGlobalPageTemplate::setHeaderPageTitle (   $a_title)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 309 of file class.ilGlobalPageTemplate.php.

310 {
311 $this->legacy_content_template->setHeaderPageTitle($a_title);
312 }

◆ setLeftContent()

ilGlobalPageTemplate::setLeftContent (   $a_html)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 193 of file class.ilGlobalPageTemplate.php.

194 {
195 $this->legacy_content_template->setLeftContent($a_html);
196 }

◆ setLeftNavContent()

ilGlobalPageTemplate::setLeftNavContent (   $a_content)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 512 of file class.ilGlobalPageTemplate.php.

513 {
514 // Nothing to do, this should be handled in Slates later
515 }

◆ setLocator()

ilGlobalPageTemplate::setLocator ( )

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 475 of file class.ilGlobalPageTemplate.php.

476 {
477 // Nothing to do
478 }

◆ setLoginTargetPar()

ilGlobalPageTemplate::setLoginTargetPar (   $a_val)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 530 of file class.ilGlobalPageTemplate.php.

531 {
532 // Nothing to do
533 }

◆ setOnScreenMessage()

ilGlobalPageTemplate::setOnScreenMessage (   $a_type,
  $a_txt,
  $a_keep = false 
)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 280 of file class.ilGlobalPageTemplate.php.

281 {
282 $this->legacy_content_template->setOnScreenMessage($a_type, $a_txt, $a_keep);
283 }
$a_type
Definition: workflow.php:92

References $a_type.

◆ setPageFormAction()

ilGlobalPageTemplate::setPageFormAction (   $a_action)
Parameters
$a_action

Implements ilGlobalTemplateInterface.

Definition at line 327 of file class.ilGlobalPageTemplate.php.

328 {
329 $this->legacy_content_template->setPageFormAction($a_action);
330 }

◆ setPermanentLink()

ilGlobalPageTemplate::setPermanentLink (   $a_type,
  $a_id,
  $a_append = "",
  $a_target = "",
  $a_title = "" 
)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 484 of file class.ilGlobalPageTemplate.php.

485 {
486 $href = ilLink::_getStaticLink($a_id, $a_type, true, $a_append);
487 PageContentProvider::setPermaLink($href);
488 }

References $a_type, and ilLink\_getStaticLink().

+ Here is the call graph for this function:

◆ setRightContent()

ilGlobalPageTemplate::setRightContent (   $a_html)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 202 of file class.ilGlobalPageTemplate.php.

203 {
204 $this->legacy_content_template->setRightContent($a_html);
205 }

Referenced by ILIAS\Blog\Export\BlogHtmlExport\writeExportFile().

+ Here is the caller graph for this function:

◆ setSubTabs()

ilGlobalPageTemplate::setSubTabs (   $a_tabs_html)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 597 of file class.ilGlobalPageTemplate.php.

598 {
599 throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
600 }

◆ setTabs()

ilGlobalPageTemplate::setTabs (   $a_tabs_html)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 588 of file class.ilGlobalPageTemplate.php.

589 {
590 throw new NotImplementedException("This Method is no longer available in GlobalTemplate");
591 }

◆ setTitle()

ilGlobalPageTemplate::setTitle (   $a_title,
  $hidden = false 
)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 225 of file class.ilGlobalPageTemplate.php.

226 {
227 $this->legacy_content_template->setTitle((string) $a_title, $hidden);
228
229 $short_title = (string) $this->il_settings->get('short_inst_name');
230 if (trim($short_title) === "") {
231 $short_title = 'ILIAS';
232 }
233
234 PageContentProvider::setShortTitle($short_title);
235 PageContentProvider::setViewTitle((string) $a_title);
236 $header_title = ilObjSystemFolder::_getHeaderTitle();
237 PageContentProvider::setTitle($header_title);
238 }

◆ setTitleIcon()

ilGlobalPageTemplate::setTitleIcon (   $a_icon_path,
  $a_icon_desc = "" 
)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 253 of file class.ilGlobalPageTemplate.php.

254 {
255 $this->legacy_content_template->setIconPath($a_icon_path);
256 $this->legacy_content_template->setIconDesc($a_icon_desc);
257 }

◆ setTreeFlatIcon()

ilGlobalPageTemplate::setTreeFlatIcon (   $a_link,
  $a_mode 
)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 494 of file class.ilGlobalPageTemplate.php.

495 {
496 // Nothing to do
497 }

◆ setVariable()

ilGlobalPageTemplate::setVariable (   $variable,
  $value = '' 
)
Parameters
$variable
string$value

Implements ilGlobalTemplateInterface.

Definition at line 353 of file class.ilGlobalPageTemplate.php.

354 {
355 if ($variable === "LOCATION_CONTENT_STYLESHEET" || $variable === "LOCATION_SYNTAX_STYLESHEET") {
356 $this->addCss($value);
357
358 return;
359 }
360 $this->legacy_content_template->setVariable($variable, $value);
361 }
addCss($a_css_file, $media="screen")
@inheritDoc

References addCss().

+ Here is the call graph for this function:

◆ touchBlock()

ilGlobalPageTemplate::touchBlock (   $blockname)

@inheritDoc

Implements ilGlobalTemplateInterface.

Definition at line 402 of file class.ilGlobalPageTemplate.php.

403 {
404 if (in_array($blockname, self::$ignored_blocks)) {
405 return; // TODO why is this needed?
406 }
407 if ($this->blockExists($blockname)) {
408 $this->legacy_content_template->touchBlock($blockname);
409 } else {
410 throw new ilTemplateException("block " . var_export($blockname, true) . " not found");
411 }
412 }

References blockExists().

+ Here is the call graph for this function:

Field Documentation

◆ $gs

ilGlobalPageTemplate::$gs
private

Definition at line 32 of file class.ilGlobalPageTemplate.php.

Referenced by __construct().

◆ $http

ilGlobalPageTemplate::$http
private

Definition at line 28 of file class.ilGlobalPageTemplate.php.

Referenced by __construct().

◆ $ignored_blocks

ilGlobalPageTemplate::$ignored_blocks = ['ContentStyle', "DEFAULT", "SyntaxStyle", ""]
staticprivate

Definition at line 21 of file class.ilGlobalPageTemplate.php.

◆ $legacy_content_template

ilGlobalPageTemplate::$legacy_content_template
private

Definition at line 40 of file class.ilGlobalPageTemplate.php.

◆ $lng

ilGlobalPageTemplate::$lng
private

Definition at line 44 of file class.ilGlobalPageTemplate.php.

◆ $ui

ilGlobalPageTemplate::$ui
private

Definition at line 36 of file class.ilGlobalPageTemplate.php.

Referenced by __construct().


The documentation for this class was generated from the following file: