ILIAS  release_7 Revision v7.30-3-g800a261c036
ilGlobalTemplate Class Reference

special template class to simplify handling of ITX/PEAR More...

+ Inheritance diagram for ilGlobalTemplate:
+ Collaboration diagram for ilGlobalTemplate:

Public Member Functions

 __construct ( $file, $flag1, $flag2, $in_module=false, $vars="DEFAULT", $plugin=false, $a_use_cache=true)
 constructor More...
 
 printToString ($part="DEFAULT")
 
 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)
 
 fillOnLoadCode ()
 Fill add on load code. More...
 
 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...
 
 fillCssFiles ($a_force=false)
 Fill in the css file tags. More...
 
 setBodyClass ($a_class="")
 
 fillBodyClass ()
 
 renderPage ($part, $a_fill_tabs, $a_skip_main_menu, \ILIAS\DI\Container $DIC)
 
 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...
 
 fillTabs ()
 
 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...
 
 fillContentLanguage ()
 Add current user language to meta tags. More...
 
 fillWindowTitle ()
 
 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)
 
 fillScreenReaderFocus ()
 Accessibility focus for screen readers. 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")
 public More...
 
 touchBlock ($block)
 overwrites ITX::touchBlock. More...
 
 parseCurrentBlock ($part="DEFAULT")
 Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public. More...
 
 addBlockFile ($var, $block, $tplname, $in_module=false)
 overwrites ITX::addBlockFile public More...
 
 blockExists ($a_blockname)
 check if block exists in actual template private More...
 
 getJSFiles ()
 
 getCSSFiles ()
 
 getInlineCSS ()
 
- Public Member Functions inherited from ilGlobalTemplateInterface
 printToString ()
 Use this method to get the finally rendered page as string. More...
 

Data Fields

const MESSAGE_TYPE_FAILURE = 'failure'
 
const MESSAGE_TYPE_INFO = "info"
 
const MESSAGE_TYPE_SUCCESS = "success"
 
const MESSAGE_TYPE_QUESTION = "question"
 

Protected Member Functions

 fillJavascriptFile ($file, $vers)
 

Protected Attributes

 $tree_flat_link = ""
 
 $page_form_action = ""
 
 $permanent_link = false
 
 $main_content = ""
 
 $lightbox = array()
 
 $standard_template_loaded = false
 
 $template
 
 $main_menu
 
 $main_menu_spacer
 
 $message = array()
 
 $js_files = array(0 => "./Services/JavaScript/js/Basic.js")
 
 $js_files_vp = array("./Services/JavaScript/js/Basic.js" => true)
 
 $js_files_batch = array("./Services/JavaScript/js/Basic.js" => 1)
 
 $css_files = array()
 
 $inline_css = array()
 Stores CSS to be included directly. More...
 
 $header_page_title = ""
 
 $title = ""
 
 $title_desc = ""
 
 $title_alerts = array()
 
 $header_action
 
 $tabs_html = ""
 
 $sub_tabs_html = ""
 
 $admin_panel_commands_toolbar = null
 
 $admin_panel_arrow = null
 
 $admin_panel_bottom = null
 

Static Protected Attributes

static $message_types
 

Private Member Functions

 fillFooter ()
 Fill the footer area. More...
 
 getMainMenu ()
 
 fillMainMenu ()
 
 initHelp ()
 Init help. More...
 
 fillMessage ()
 Fill message area. More...
 
 getMessageTextForType ($m)
 
 resetCss ()
 Reset css files. More...
 
 fillInlineCss ()
 Fill in the inline css. More...
 
 fillNewContentStyle ()
 Fill Content Style. More...
 
 fillHeader ()
 Fill header. More...
 
 getHeaderActionMenu ()
 Get header action menu. More...
 
 getTabsHTML ()
 
 fillLeftNav ()
 Fill left navigation frame. More...
 
 setCenterColumnClass ()
 
 fillMainContent ()
 
 fillLeftContent ()
 
 fillRightContent ()
 
 fillToolbar ()
 
 fillPageFormAction ()
 
 getLoginTargetPar ()
 Get target parameter for login. More...
 
 handleReferer ()
 TODO: this is nice, but shouldn't be done here (-> maybe at the end of ilias.php!?, alex) More...
 
 fillSideIcons ()
 Fill side icons (upper icon, tree icon, webfolder icon) More...
 
 fillLightbox ()
 Fill lightbox content. More...
 
 fillAdminPanel ()
 Put admin panel into template: More...
 
 fillPermanentLink ()
 Fill in permanent link. More...
 
 variableExists ($a_variablename)
 

Private Attributes

 $show_footer = true
 

Detailed Description

special template class to simplify handling of ITX/PEAR

Author
Stefan Kesseler skess.nosp@m.eler.nosp@m.@data.nosp@m.bay..nosp@m.de
Sascha Hofmann shofm.nosp@m.ann@.nosp@m.datab.nosp@m.ay.d.nosp@m.e
Version
$Id$

Definition at line 13 of file class.ilGlobalTemplate.php.

Constructor & Destructor Documentation

◆ __construct()

ilGlobalTemplate::__construct (   $file,
  $flag1,
  $flag2,
  $in_module = false,
  $vars = "DEFAULT",
  $plugin = false,
  $a_use_cache = true 
)

constructor

Parameters
string$filetemplatefile (mit oder ohne pfad)
boolean$flag1remove unknown variables
boolean$flag2remove empty blocks
boolean$in_moduleshould be set to true, if template file is in module subdirectory
array$varsvariables to replace public

Definition at line 37 of file class.ilGlobalTemplate.php.

References XapiProxy\$plugin, and setBodyClass().

45  {
46  $this->setBodyClass("std");
47  $this->template = new ilTemplate($file, $flag1, $flag2, $in_module, $vars, $plugin, $a_use_cache);
48  }
+ Here is the call graph for this function:

Member Function Documentation

◆ addAdminPanelToolbar()

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

Add admin panel commands as toolbar.

Parameters
ilToolbarGUI$toolb
bool$a_top_only

Implements ilGlobalTemplateInterface.

Definition at line 1672 of file class.ilGlobalTemplate.php.

1673  {
1674  $this->admin_panel_commands_toolbar = $toolb;
1675  $this->admin_panel_arrow = $a_arrow;
1676  $this->admin_panel_bottom = $a_bottom_panel;
1677  }

◆ addBlockFile()

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

overwrites ITX::addBlockFile public

Parameters
string
string
string$tplnametemplate name
boolean$in_moduleshould be set to true, if template file is in module subdirectory
Returns
boolean/string

Implements ilGlobalTemplateInterface.

Definition at line 1842 of file class.ilGlobalTemplate.php.

Referenced by loadStandardTemplate().

1843  {
1844  return $this->template->addBlockFile($var, $block, $tplname, $in_module);
1845  }
+ Here is the caller graph for this function:

◆ addCss()

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

Add a css file that should be included in the header.

Implements ilGlobalTemplateInterface.

Definition at line 598 of file class.ilGlobalTemplate.php.

599  {
600  if (!array_key_exists($a_css_file . $media, $this->css_files)) {
601  $this->css_files[$a_css_file . $media] = array("file" => $a_css_file, "media" => $media);
602  }
603  }

◆ addInlineCss()

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

Add a css file that should be included in the header.

Implements ilGlobalTemplateInterface.

Definition at line 612 of file class.ilGlobalTemplate.php.

613  {
614  $this->inline_css[] = array("css" => $a_css, "media" => $media);
615  }

◆ addJavaScript()

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

Add a javascript file that should be included in the header.

Implements ilGlobalTemplateInterface.

Definition at line 433 of file class.ilGlobalTemplate.php.

434  {
435  // three batches currently
436  if ($a_batch < 1 || $a_batch > 3) {
437  $a_batch = 2;
438  }
439 
440  // ensure jquery files being loaded first
441  if (is_int(strpos($a_js_file, "Services/jQuery")) ||
442  is_int(strpos($a_js_file, "/jquery.js")) ||
443  is_int(strpos($a_js_file, "/jquery/")) ||
444  is_int(strpos($a_js_file, "/jquery-ui/")) ||
445  is_int(strpos($a_js_file, "/jquery-min.js"))) {
446  $a_batch = 0;
447  }
448 
449  if (!in_array($a_js_file, $this->js_files)) {
450  $this->js_files[] = $a_js_file;
451  $this->js_files_vp[$a_js_file] = $a_add_version_parameter;
452  $this->js_files_batch[$a_js_file] = $a_batch;
453  }
454  }

◆ addLightbox()

ilGlobalTemplate::addLightbox (   $a_html,
  $a_id 
)

Add lightbox html.

Implements ilGlobalTemplateInterface.

Definition at line 1634 of file class.ilGlobalTemplate.php.

1635  {
1636  $this->lightbox[$a_id] = $a_html;
1637  }

◆ addOnLoadCode()

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

Add on load code.

Implements ilGlobalTemplateInterface.

Definition at line 459 of file class.ilGlobalTemplate.php.

460  {
461  // three batches currently
462  if ($a_batch < 1 || $a_batch > 3) {
463  $a_batch = 2;
464  }
465  $this->on_load_code[$a_batch][] = $a_code;
466  }

◆ blockExists()

ilGlobalTemplate::blockExists (   $a_blockname)

check if block exists in actual template private

Parameters
stringblockname
Returns
boolean

Implements ilGlobalTemplateInterface.

Definition at line 1853 of file class.ilGlobalTemplate.php.

Referenced by fillBodyClass(), fillCssFiles(), fillInlineCss(), fillJavaScriptFiles(), fillScreenReaderFocus(), fillTabs(), getSpecial(), getTabsHTML(), renderPage(), setCenterColumnClass(), and setTabs().

1854  {
1855  return $this->template->blockExists($a_blockname);
1856  }
+ Here is the caller graph for this function:

◆ clearHeader()

ilGlobalTemplate::clearHeader ( )

Clear header.

Implements ilGlobalTemplateInterface.

Definition at line 897 of file class.ilGlobalTemplate.php.

References setAlertProperties(), setDescription(), setTitle(), and setTitleIcon().

898  {
899  $this->setTitle("");
900  $this->setTitleIcon("");
901  $this->setDescription("");
902  $this->setAlertProperties(array());
903  }
setTitleIcon($a_icon_path, $a_icon_desc="")
set title icon
setAlertProperties(array $a_props)
Set alert properties.
setTitle($a_title, $hidden=false)
Sets title in standard template.
setDescription($a_descr)
Sets descripton below title in standard template.
+ Here is the call graph for this function:

◆ enableDragDropFileUpload()

ilGlobalTemplate::enableDragDropFileUpload (   $a_ref_id)

Enables the file upload into this object by dropping a file.

Implements ilGlobalTemplateInterface.

Definition at line 1772 of file class.ilGlobalTemplate.php.

Referenced by resetHeaderBlock().

1773  {
1774  $this->enable_fileupload = $a_ref_id;
1775  }
+ Here is the caller graph for this function:

◆ fillAdminPanel()

ilGlobalTemplate::fillAdminPanel ( )
private

Put admin panel into template:

  • creation selector
  • admin view on/off button

Definition at line 1684 of file class.ilGlobalTemplate.php.

References $admin_panel_commands_toolbar, $DIC, $lng, fillPageFormAction(), ilUtil\getImagePath(), parseCurrentBlock(), setCurrentBlock(), and setVariable().

Referenced by getSpecial(), and renderPage().

1685  {
1686  global $DIC;
1687  $lng = $DIC->language();
1688 
1689  if ($this->admin_panel_commands_toolbar === null) {
1690  return;
1691  }
1692 
1694  assert($toolb instanceof \ilToolbarGUI);
1695 
1696  // Add arrow if desired.
1697  if ($this->admin_panel_arrow) {
1698  $toolb->setLeadingImage(ilUtil::getImagePath("arrow_upright.svg"), $lng->txt("actions"));
1699  }
1700 
1701  $this->fillPageFormAction();
1702 
1703  // Add top admin bar.
1704  $this->setCurrentBlock("adm_view_components");
1705  $this->setVariable("ADM_PANEL1", $toolb->getHTML());
1706  $this->parseCurrentBlock();
1707 
1708  // Add bottom admin bar if user wants one.
1709  if ($this->admin_panel_bottom) {
1710  $this->setCurrentBlock("adm_view_components2");
1711 
1712  // Replace previously set arrow image.
1713  if ($this->admin_panel_arrow) {
1714  $toolb->setLeadingImage(ilUtil::getImagePath("arrow_downright.svg"), $lng->txt("actions"));
1715  }
1716 
1717  $this->setVariable("ADM_PANEL2", $toolb->getHTML());
1718  $this->parseCurrentBlock();
1719  }
1720  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
$lng
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
global $DIC
Definition: goto.php:24
setCurrentBlock($part="DEFAULT")
public
setVariable($variable, $value='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillBodyClass()

ilGlobalTemplate::fillBodyClass ( )

Definition at line 656 of file class.ilGlobalTemplate.php.

References blockExists(), parseCurrentBlock(), setCurrentBlock(), and setVariable().

Referenced by getSpecial(), and renderPage().

657  {
658  if ($this->body_class != "" && $this->blockExists("body_class")) {
659  $this->setCurrentBlock("body_class");
660  $this->setVariable("BODY_CLASS", $this->body_class);
661  $this->parseCurrentBlock();
662  }
663  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
setCurrentBlock($part="DEFAULT")
public
setVariable($variable, $value='')
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillContentLanguage()

ilGlobalTemplate::fillContentLanguage ( )

Add current user language to meta tags.

Definition at line 1271 of file class.ilGlobalTemplate.php.

References $DIC, $lng, and setVariable().

Referenced by getSpecial(), and renderPage().

1272  {
1273  global $DIC;
1274  $lng = $DIC->language();
1275 
1276  if (is_object($lng)) {
1277  $this->setVariable('META_CONTENT_LANGUAGE', $lng->getContentLanguage());
1278  $this->setVariable('LANGUAGE_DIRECTION', $lng->getTextDirection());
1279  }
1280  }
$lng
global $DIC
Definition: goto.php:24
setVariable($variable, $value='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillCssFiles()

ilGlobalTemplate::fillCssFiles (   $a_force = false)

Fill in the css file tags.

Parameters
boolean$a_force

Definition at line 622 of file class.ilGlobalTemplate.php.

References $filename, blockExists(), parseCurrentBlock(), setCurrentBlock(), and setVariable().

Referenced by getSpecial(), and renderPage().

623  {
624  if (!$this->blockExists("css_file")) {
625  return;
626  }
627  foreach ($this->css_files as $css) {
628  $filename = $css["file"];
629  if (strpos($filename, "?") > 0) {
630  $filename = substr($filename, 0, strpos($filename, "?"));
631  }
632  if (is_file($filename) || $a_force) {
633  $this->setCurrentBlock("css_file");
634  $this->setVariable("CSS_FILE", $css["file"]);
635  $this->setVariable("CSS_MEDIA", $css["media"]);
636  $this->parseCurrentBlock();
637  }
638  }
639  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
$filename
Definition: buildRTE.php:89
setCurrentBlock($part="DEFAULT")
public
setVariable($variable, $value='')
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillFooter()

ilGlobalTemplate::fillFooter ( )
private

Fill the footer area.

Definition at line 90 of file class.ilGlobalTemplate.php.

References $_GET, $_SERVER, $DIC, Vendor\Package\$f, $GLOBALS, $ilBench, $ilDB, $ilSetting, $lng, $total, $url, ilObjLanguageAccess\_checkTranslate(), ilLink\_getStaticLink(), ilObjLanguageAccess\_getTranslationLink(), ilObjLanguageAccess\_isPageTranslation(), ilUtil\appendUrlParameterString(), ilSystemSupportContactsGUI\getFooterLink(), ilSystemSupportContactsGUI\getFooterText(), ilImprint\isActive(), ilUtil\secureUrl(), setVariable(), ilUtil\sortArray(), and ilValidatorAdapter\validate().

Referenced by getSpecial(), and renderPage().

91  {
92  global $DIC;
93 
94  $ilSetting = $DIC->settings();
95 
96  $lng = $DIC->language();
97 
98  $ilCtrl = $DIC->ctrl();
99  $ilDB = $DIC->database();
100 
101  if (!$this->show_footer) {
102  return;
103  }
104 
105  $ftpl = new ilTemplate("tpl.footer.html", true, true, "Services/UICore");
106 
107  $php = "";
108  if (DEVMODE) {
109  $php = ", PHP " . phpversion();
110  }
111  $ftpl->setVariable("ILIAS_VERSION", $ilSetting->get("ilias_version") . $php);
112 
113  $link_items = array();
114 
115  // imprint
116  include_once "Services/Imprint/classes/class.ilImprint.php";
117  if ($_REQUEST["baseClass"] != "ilImprintGUI" && ilImprint::isActive()) {
118  include_once "Services/Link/classes/class.ilLink.php";
119  $link_items[ilLink::_getStaticLink(0, "impr")] = array($lng->txt("imprint"), true);
120  }
121 
122  // system support contacts
123  include_once("./Modules/SystemFolder/classes/class.ilSystemSupportContactsGUI.php");
124  if (($l = ilSystemSupportContactsGUI::getFooterLink()) != "") {
125  $link_items[$l] = array(ilSystemSupportContactsGUI::getFooterText(), false);
126  }
127 
128  if (DEVMODE) {
129  if (function_exists("tidy_parse_string")) {
130  $link_items[ilUtil::appendUrlParameterString($_SERVER["REQUEST_URI"], "do_dev_validate=xhtml")] = array("Validate", true);
131  $link_items[ilUtil::appendUrlParameterString($_SERVER["REQUEST_URI"], "do_dev_validate=accessibility")] = array("Accessibility", true);
132  }
133  }
134 
135  // output translation link
136  include_once("Services/Language/classes/class.ilObjLanguageAccess.php");
138  $link_items[ilObjLanguageAccess::_getTranslationLink()] = array($lng->txt('translation'), true);
139  }
140 
141  $cnt = 0;
142  foreach ($link_items as $url => $caption) {
143  $cnt++;
144  if ($caption[1]) {
145  $ftpl->touchBlock("blank");
146  }
147  if ($cnt < sizeof($link_items)) {
148  $ftpl->touchBlock("item_separator");
149  }
150 
151  $ftpl->setCurrentBlock("items");
152  $ftpl->setVariable("URL_ITEM", ilUtil::secureUrl($url));
153  $ftpl->setVariable("TXT_ITEM", $caption[0]);
154  $ftpl->parseCurrentBlock();
155  }
156 
157  if (DEVMODE) {
158  // execution time
159  $t1 = explode(" ", $GLOBALS['ilGlobalStartTime']);
160  $t2 = explode(" ", microtime());
161  $diff = $t2[0] - $t1[0] + $t2[1] - $t1[1];
162 
163  $mem_usage = array();
164  if (function_exists("memory_get_usage")) {
165  $mem_usage[] =
166  "Memory Usage: " . memory_get_usage() . " Bytes";
167  }
168  if (function_exists("xdebug_peak_memory_usage")) {
169  $mem_usage[] =
170  "XDebug Peak Memory Usage: " . xdebug_peak_memory_usage() . " Bytes";
171  }
172  $mem_usage[] = round($diff, 4) . " Seconds";
173 
174  if (sizeof($mem_usage)) {
175  $ftpl->setVariable("MEMORY_USAGE", "<br>" . implode(" | ", $mem_usage));
176  }
177 
178  if (!empty($_GET["do_dev_validate"]) && $ftpl->blockExists("xhtml_validation")) {
179  require_once("Services/XHTMLValidator/classes/class.ilValidatorAdapter.php");
180  $template2 = clone($this);
181  $ftpl->setCurrentBlock("xhtml_validation");
182  $ftpl->setVariable(
183  "VALIDATION",
184  ilValidatorAdapter::validate($template2->get(
185  "DEFAULT",
186  false,
187  false,
188  false,
189  true
190  ), $_GET["do_dev_validate"])
191  );
192  $ftpl->parseCurrentBlock();
193  }
194 
195  // controller history
196  if (is_object($ilCtrl) && $ftpl->blockExists("c_entry") &&
197  $ftpl->blockExists("call_history")) {
198  $hist = $ilCtrl->getCallHistory();
199  foreach ($hist as $entry) {
200  $ftpl->setCurrentBlock("c_entry");
201  $ftpl->setVariable("C_ENTRY", $entry["class"]);
202  if (is_object($ilDB)) {
203  $file = $ilCtrl->lookupClassPath($entry["class"]);
204  $add = $entry["mode"] . " - " . $entry["cmd"];
205  if ($file != "") {
206  $add .= " - " . $file;
207  }
208  $ftpl->setVariable("C_FILE", $add);
209  }
210  $ftpl->parseCurrentBlock();
211  }
212  $ftpl->setCurrentBlock("call_history");
213  $ftpl->parseCurrentBlock();
214  }
215 
216  // included files
217  if (is_object($ilCtrl) && $ftpl->blockExists("i_entry") &&
218  $ftpl->blockExists("included_files")) {
219  $fs = get_included_files();
220  $ifiles = array();
221  $total = 0;
222  foreach ($fs as $f) {
223  $ifiles[] = array("file" => $f, "size" => filesize($f));
224  $total += filesize($f);
225  }
226  $ifiles = ilUtil::sortArray($ifiles, "size", "desc", true);
227  foreach ($ifiles as $f) {
228  $ftpl->setCurrentBlock("i_entry");
229  $ftpl->setVariable("I_ENTRY", $f["file"] . " (" . $f["size"] . " Bytes, " . round(100 / $total * $f["size"], 2) . "%)");
230  $ftpl->parseCurrentBlock();
231  }
232  $ftpl->setCurrentBlock("i_entry");
233  $ftpl->setVariable("I_ENTRY", "Total (" . $total . " Bytes, 100%)");
234  $ftpl->parseCurrentBlock();
235  $ftpl->setCurrentBlock("included_files");
236  $ftpl->parseCurrentBlock();
237  }
238  }
239 
240  // BEGIN Usability: Non-Delos Skins can display the elapsed time in the footer
241  // The corresponding $ilBench->start invocation is in inc.header.php
242  $ilBench = $DIC["ilBench"];
243  $ilBench->stop("Core", "ElapsedTimeUntilFooter");
244  $ftpl->setVariable(
245  "ELAPSED_TIME",
246  ", " . number_format($ilBench->getMeasuredTime("Core", "ElapsedTimeUntilFooter"), 1) . ' seconds'
247  );
248  // END Usability: Non-Delos Skins can display the elapsed time in the footer
249 
250  $this->setVariable("FOOTER", $ftpl->get());
251  }
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
static _isPageTranslation()
Check if the current request is a page translation.
$_GET["client_id"]
$total
Definition: Utf8Test.php:87
static validate($a_html, $a_mode)
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
static _getTranslationLink()
Get the link to translate the current page.
$lng
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10
global $DIC
Definition: goto.php:24
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
static secureUrl($url)
Prepare secure href attribute.
setVariable($variable, $value='')
global $ilSetting
Definition: privfeed.php:17
global $ilBench
Definition: ilias.php:21
global $ilDB
$url
static _checkTranslate()
Permission check for translations.
static isActive()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillHeader()

ilGlobalTemplate::fillHeader ( )
private

Fill header.

Definition at line 940 of file class.ilGlobalTemplate.php.

References $DIC, $lng, $title, getHeaderActionMenu(), parseCurrentBlock(), setCurrentBlock(), setVariable(), and ilUtil\stripScriptHTML().

Referenced by getSpecial(), and renderPage().

941  {
942  global $DIC;
943 
944  $lng = $DIC->language();
945 
946  $icon = false;
947  if ($this->icon_path != "") {
948  $icon = true;
949  $this->setCurrentBlock("header_image");
950  if ($this->icon_desc != "") {
951  $this->setVariable("IMAGE_DESC", $lng->txt("icon") . " " . $this->icon_desc);
952  $this->setVariable("IMAGE_ALT", $lng->txt("icon") . " " . $this->icon_desc);
953  }
954 
955  $this->setVariable("IMG_HEADER", $this->icon_path);
956  $this->parseCurrentBlock();
957  $header = true;
958  }
959 
960  if ($this->title != "") {
961  $title = ilUtil::stripScriptHTML($this->title);
962  $this->setVariable("HEADER", $title);
963 
964  $header = true;
965  }
966 
967  if ($header) {
968  $this->setCurrentBlock("header_image");
969  $this->parseCurrentBlock();
970  }
971 
972  if ($this->title_desc != "") {
973  $this->setCurrentBlock("header_desc");
974  $this->setVariable("H_DESCRIPTION", $this->title_desc);
975  $this->parseCurrentBlock();
976  }
977 
978  $header = $this->getHeaderActionMenu();
979  if ($header) {
980  $this->setCurrentBlock("head_action_inner");
981  $this->setVariable("HEAD_ACTION", $header);
982  $this->parseCurrentBlock();
983  }
984 
985  if (count((array) $this->title_alerts)) {
986  foreach ($this->title_alerts as $alert) {
987  $this->setCurrentBlock('header_alert');
988  if (!($alert['propertyNameVisible'] === false)) {
989  $this->setVariable('H_PROP', $alert['property'] . ':');
990  }
991  $this->setVariable('H_VALUE', $alert['value']);
992  $this->parseCurrentBlock();
993  }
994  }
995 
996  // add file upload drop zone in header
997  if ($this->enable_fileupload != null) {
998  $ref_id = $this->enable_fileupload;
999  $upload_id = "dropzone_" . $ref_id;
1000 
1001  include_once("./Services/FileUpload/classes/class.ilFileUploadGUI.php");
1002  $upload = new ilFileUploadGUI($upload_id, $ref_id, true);
1003 
1004  $this->setVariable("FILEUPLOAD_DROPZONE_ID", " id=\"$upload_id\"");
1005 
1006  $this->setCurrentBlock("header_fileupload");
1007  $this->setVariable("HEADER_FILEUPLOAD_SCRIPT", $upload->getHTML());
1008  $this->parseCurrentBlock();
1009  }
1010  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
getHeaderActionMenu()
Get header action menu.
static stripScriptHTML($a_str, $a_allow="", $a_rm_js=true)
strip only html tags (4.0) from text $allowed contains tags to be allowed, in format tags a and b ar...
$lng
global $DIC
Definition: goto.php:24
setCurrentBlock($part="DEFAULT")
public
setVariable($variable, $value='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillInlineCss()

ilGlobalTemplate::fillInlineCss ( )
private

Fill in the inline css.

Parameters
boolean$a_force

Definition at line 783 of file class.ilGlobalTemplate.php.

References blockExists(), parseCurrentBlock(), setCurrentBlock(), and setVariable().

Referenced by getSpecial(), and renderPage().

784  {
785  if (!$this->blockExists("css_inline")) {
786  return;
787  }
788  foreach ($this->inline_css as $css) {
789  $this->setCurrentBlock("css_inline");
790  $this->setVariable("CSS_INLINE", $css["css"]);
791  $this->parseCurrentBlock();
792  }
793  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
setCurrentBlock($part="DEFAULT")
public
setVariable($variable, $value='')
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillJavascriptFile()

ilGlobalTemplate::fillJavascriptFile (   $file,
  $vers 
)
protected
Parameters
string$file
string$vers

Definition at line 565 of file class.ilGlobalTemplate.php.

References ilUtil\appendUrlParameterString(), parseCurrentBlock(), setCurrentBlock(), and setVariable().

Referenced by fillJavaScriptFiles().

566  {
567  $this->setCurrentBlock("js_file");
568  if ($this->js_files_vp[$file]) {
569  $this->setVariable("JS_FILE", ilUtil::appendUrlParameterString($file, $vers));
570  } else {
571  $this->setVariable("JS_FILE", $file);
572  }
573  $this->parseCurrentBlock();
574  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
setCurrentBlock($part="DEFAULT")
public
setVariable($variable, $value='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillJavaScriptFiles()

ilGlobalTemplate::fillJavaScriptFiles (   $a_force = false)

Implements ilGlobalTemplateInterface.

Definition at line 509 of file class.ilGlobalTemplate.php.

References $DIC, $i, $ilSetting, blockExists(), and fillJavascriptFile().

Referenced by getSpecial(), and renderPage().

510  {
511  global $DIC;
512 
513  $ilSetting = $DIC->settings();
514 
515  if (is_object($ilSetting)) { // maybe this one can be removed
516  $vers = "vers=" . str_replace(array(".", " "), "-", $ilSetting->get("ilias_version"));
517 
518  if (DEVMODE) {
519  $vers .= '-' . time();
520  }
521  }
522  if ($this->blockExists("js_file")) {
523  // three batches
524  for ($i = 0; $i <= 3; $i++) {
525  reset($this->js_files);
526  foreach ($this->js_files as $file) {
527  if ($this->js_files_batch[$file] == $i) {
528  if (is_file($file) || substr($file, 0, 4) == "http" || substr($file, 0, 2) == "//" || $a_force) {
529  $this->fillJavascriptFile($file, $vers);
530  } elseif (substr($file, 0, 2) == './') { // #13962
531  $url_parts = parse_url($file);
532  if (is_file($url_parts['path'])) {
533  $this->fillJavascriptFile($file, $vers);
534  }
535  }
536  }
537  }
538  }
539  }
540  }
fillJavascriptFile($file, $vers)
global $DIC
Definition: goto.php:24
global $ilSetting
Definition: privfeed.php:17
blockExists($a_blockname)
check if block exists in actual template private
$i
Definition: metadata.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillLeftContent()

ilGlobalTemplate::fillLeftContent ( )
private

Definition at line 1220 of file class.ilGlobalTemplate.php.

References parseCurrentBlock(), setCurrentBlock(), and setVariable().

Referenced by getSpecial(), and renderPage().

1221  {
1222  if (trim($this->left_content) != "") {
1223  $this->setCurrentBlock("left_column");
1224  $this->setVariable("LEFT_CONTENT", $this->left_content);
1225  $left_col_class = (trim($this->right_content) == "")
1226  ? "col-sm-3 col-sm-pull-9"
1227  : "col-sm-3 col-sm-pull-6";
1228  $this->setVariable("LEFT_COL_CLASS", $left_col_class);
1229  $this->parseCurrentBlock();
1230  }
1231  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
setCurrentBlock($part="DEFAULT")
public
setVariable($variable, $value='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillLeftNav()

ilGlobalTemplate::fillLeftNav ( )
private

Fill left navigation frame.

Definition at line 1169 of file class.ilGlobalTemplate.php.

References parseCurrentBlock(), setCurrentBlock(), setVariable(), and touchBlock().

Referenced by getSpecial(), and renderPage().

1170  {
1171  if (trim($this->left_nav_content) != "") {
1172  $this->setCurrentBlock("left_nav");
1173  $this->setVariable("LEFT_NAV_CONTENT", $this->left_nav_content);
1174  $this->parseCurrentBlock();
1175  $this->touchBlock("left_nav_space");
1176  }
1177  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
touchBlock($block)
overwrites ITX::touchBlock.
setCurrentBlock($part="DEFAULT")
public
setVariable($variable, $value='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillLightbox()

ilGlobalTemplate::fillLightbox ( )
private

Fill lightbox content.

Parameters

Definition at line 1645 of file class.ilGlobalTemplate.php.

References setVariable().

Referenced by getSpecial(), and renderPage().

1646  {
1647  $html = "";
1648 
1649  foreach ($this->lightbox as $lb) {
1650  $html .= $lb;
1651  }
1652  $this->setVariable("LIGHTBOX", $html);
1653  }
setVariable($variable, $value='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMainContent()

ilGlobalTemplate::fillMainContent ( )
private

Definition at line 1213 of file class.ilGlobalTemplate.php.

References setVariable().

Referenced by getSpecial(), and renderPage().

1214  {
1215  if (trim($this->main_content) != "") {
1216  $this->setVariable("ADM_CONTENT", $this->main_content);
1217  }
1218  }
setVariable($variable, $value='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMainMenu()

ilGlobalTemplate::fillMainMenu ( )
private

Definition at line 283 of file class.ilGlobalTemplate.php.

References $DIC, $tpl, and variableExists().

Referenced by getSpecial(), and renderPage().

284  {
285  global $DIC;
286  $tpl = $DIC["tpl"];
287  if ($this->variableExists('MAINMENU')) {
288  $tpl->setVariable("MAINMENU", $this->main_menu);
289  $tpl->setVariable("MAINMENU_SPACER", $this->main_menu_spacer);
290  }
291  }
variableExists($a_variablename)
global $DIC
Definition: goto.php:24
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMessage()

ilGlobalTemplate::fillMessage ( )
private

Fill message area.

Definition at line 361 of file class.ilGlobalTemplate.php.

References $_SESSION, $DIC, $out, $txt, getMessageTextForType(), ilUtil\getSystemMessageHTML(), and setVariable().

Referenced by getSpecial(), and renderPage().

362  {
363  global $DIC;
364 
365  $out = "";
366 
367  foreach (self::$message_types as $m) {
368  $txt = $this->getMessageTextForType($m);
369 
370  if ($txt != "") {
372  }
373 
374  $request = $DIC->http()->request();
375  $accept_header = $request->getHeaderLine('Accept');
376  if (isset($_SESSION[$m]) && $_SESSION[$m] && ($accept_header !== 'application/json')) {
377  unset($_SESSION[$m]);
378  }
379  }
380 
381  if ($out != "") {
382  $this->setVariable("MESSAGE", $out);
383  }
384  }
$_SESSION["AccountId"]
static getSystemMessageHTML($a_txt, $a_type="info")
Get HTML for a system message.
global $DIC
Definition: goto.php:24
$txt
Definition: error.php:13
setVariable($variable, $value='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillNewContentStyle()

ilGlobalTemplate::fillNewContentStyle ( )
private

Fill Content Style.

Definition at line 798 of file class.ilGlobalTemplate.php.

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

Referenced by getSpecial(), and renderPage().

799  {
800  $this->setVariable(
801  "LOCATION_NEWCONTENT_STYLESHEET_TAG",
802  '<link rel="stylesheet" type="text/css" href="' .
804  . '" />'
805  );
806  }
static getNewContentStyleSheetLocation($mode="output")
get full style sheet file name (path inclusive) of current user
setVariable($variable, $value='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillOnLoadCode()

ilGlobalTemplate::fillOnLoadCode ( )

Fill add on load code.

Definition at line 545 of file class.ilGlobalTemplate.php.

References $i, parseCurrentBlock(), setCurrentBlock(), and setVariable().

Referenced by getSpecial(), and renderPage().

546  {
547  for ($i = 1; $i <= 3; $i++) {
548  if (is_array($this->on_load_code[$i])) {
549  $this->setCurrentBlock("on_load_code");
550  foreach ($this->on_load_code[$i] as $code) {
551  $this->setCurrentBlock("on_load_code_inner");
552  $this->setVariable("OLCODE", $code);
553  $this->parseCurrentBlock();
554  }
555  $this->setCurrentBlock("on_load_code");
556  $this->parseCurrentBlock();
557  }
558  }
559  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
setCurrentBlock($part="DEFAULT")
public
setVariable($variable, $value='')
$i
Definition: metadata.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillPageFormAction()

ilGlobalTemplate::fillPageFormAction ( )
private

Definition at line 1316 of file class.ilGlobalTemplate.php.

References parseCurrentBlock(), setCurrentBlock(), setVariable(), and touchBlock().

Referenced by fillAdminPanel().

1317  {
1318  if ($this->page_form_action != "") {
1319  $this->setCurrentBlock("page_form_start");
1320  $this->setVariable("PAGE_FORM_ACTION", $this->page_form_action);
1321  $this->parseCurrentBlock();
1322  $this->touchBlock("page_form_end");
1323  }
1324  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
touchBlock($block)
overwrites ITX::touchBlock.
setCurrentBlock($part="DEFAULT")
public
setVariable($variable, $value='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillPermanentLink()

ilGlobalTemplate::fillPermanentLink ( )
private

Fill in permanent link.

Definition at line 1735 of file class.ilGlobalTemplate.php.

References setVariable().

Referenced by getSpecial(), and renderPage().

1736  {
1737  if (is_array($this->permanent_link)) {
1738  include_once("./Services/PermanentLink/classes/class.ilPermanentLinkGUI.php");
1739  $plinkgui = new ilPermanentLinkGUI(
1740  $this->permanent_link["type"],
1741  $this->permanent_link["id"],
1742  $this->permanent_link["append"],
1743  $this->permanent_link["target"]
1744  );
1745  if ($this->permanent_link["title"] != "") {
1746  $plinkgui->setTitle($this->permanent_link["title"]);
1747  }
1748  $this->setVariable("PRMLINK", $plinkgui->getHTML());
1749  }
1750  }
Class for permanent links.
setVariable($variable, $value='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRightContent()

ilGlobalTemplate::fillRightContent ( )
private

Definition at line 1233 of file class.ilGlobalTemplate.php.

References parseCurrentBlock(), setCurrentBlock(), and setVariable().

Referenced by getSpecial(), and renderPage().

1234  {
1235  if (trim($this->right_content) != "") {
1236  $this->setCurrentBlock("right_column");
1237  $this->setVariable("RIGHT_CONTENT", $this->right_content);
1238  $this->parseCurrentBlock();
1239  }
1240  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
setCurrentBlock($part="DEFAULT")
public
setVariable($variable, $value='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillScreenReaderFocus()

ilGlobalTemplate::fillScreenReaderFocus ( )

Accessibility focus for screen readers.

Definition at line 1558 of file class.ilGlobalTemplate.php.

References $DIC, $ilUser, blockExists(), and touchBlock().

Referenced by getSpecial(), and renderPage().

1559  {
1560  global $DIC;
1561 
1562  $ilUser = $DIC->user();
1563 
1564  if (is_object($ilUser) && $ilUser->getPref("screen_reader_optimization") && $this->blockExists("sr_focus")) {
1565  $this->touchBlock("sr_focus");
1566  }
1567  }
touchBlock($block)
overwrites ITX::touchBlock.
global $DIC
Definition: goto.php:24
blockExists($a_blockname)
check if block exists in actual template private
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillSideIcons()

ilGlobalTemplate::fillSideIcons ( )
private

Fill side icons (upper icon, tree icon, webfolder icon)

Definition at line 1572 of file class.ilGlobalTemplate.php.

References $DIC, $ilSetting, $lng, ilFrameTargetInfo\_getFrame(), ilAccessKeyGUI\getAttribute(), ilUtil\getImagePath(), parseCurrentBlock(), setCurrentBlock(), setVariable(), touchBlock(), ilAccessKey\TREE_OFF, and ilAccessKey\TREE_ON.

Referenced by getSpecial(), and renderPage().

1573  {
1574  global $DIC;
1575 
1576  $ilSetting = $DIC->settings();
1577 
1578  $lng = $DIC->language();
1579 
1580  // tree/flat icon
1581  if ($this->tree_flat_link != "") {
1582  if ($this->left_nav_content != "") {
1583  $this->touchBlock("tree_lns");
1584  }
1585 
1586  $this->setCurrentBlock("tree_mode");
1587  $this->setVariable("LINK_MODE", $this->tree_flat_link);
1588  if ($ilSetting->get("tree_frame") == "right") {
1589  if ($this->tree_flat_mode == "tree") {
1590  $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
1591  $this->setVariable("RIGHT", "Right");
1592  } else {
1593  $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
1594  $this->setVariable("RIGHT", "Right");
1595  }
1596  } else {
1597  if ($this->tree_flat_mode == "tree") {
1598  $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
1599  } else {
1600  $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
1601  }
1602  }
1603  $this->setVariable("ALT_TREE", $lng->txt($this->tree_flat_mode . "view"));
1604  $this->setVariable("TARGET_TREE", ilFrameTargetInfo::_getFrame("MainContent"));
1605  include_once("./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
1606  $this->setVariable(
1607  "TREE_ACC_KEY",
1608  ilAccessKeyGUI::getAttribute(($this->tree_flat_mode == "tree")
1611  );
1612  $this->parseCurrentBlock();
1613  }
1614 
1615  $this->setCurrentBlock("tree_icons");
1616  $this->parseCurrentBlock();
1617  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
touchBlock($block)
overwrites ITX::touchBlock.
$lng
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
global $DIC
Definition: goto.php:24
static _getFrame($a_class, $a_type='')
Get content frame name.
setCurrentBlock($part="DEFAULT")
public
setVariable($variable, $value='')
global $ilSetting
Definition: privfeed.php:17
static getAttribute($a_func_id)
Get accesskey HTML attribute.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillTabs()

ilGlobalTemplate::fillTabs ( )

Definition at line 1106 of file class.ilGlobalTemplate.php.

References blockExists(), setVariable(), and touchBlock().

Referenced by getSpecial(), and renderPage().

1107  {
1108  if ($this->blockExists("tabs_outer_start")) {
1109  $this->touchBlock("tabs_outer_start");
1110  $this->touchBlock("tabs_outer_end");
1111  $this->touchBlock("tabs_inner_start");
1112  $this->touchBlock("tabs_inner_end");
1113 
1114  if ($this->tabs_html != "") {
1115  $this->setVariable("TABS", $this->tabs_html);
1116  }
1117  $this->setVariable("SUB_TABS", $this->sub_tabs_html);
1118  }
1119  }
touchBlock($block)
overwrites ITX::touchBlock.
setVariable($variable, $value='')
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillToolbar()

ilGlobalTemplate::fillToolbar ( )
private

Definition at line 1249 of file class.ilGlobalTemplate.php.

References $DIC, parseCurrentBlock(), setCurrentBlock(), and setVariable().

Referenced by getSpecial(), and renderPage().

1250  {
1251  global $DIC;
1252 
1253  $ilToolbar = $DIC["ilToolbar"];
1254  ;
1255 
1256  $thtml = $ilToolbar->getHTML();
1257  if ($thtml != "") {
1258  $this->setCurrentBlock("toolbar_buttons");
1259  $this->setVariable("BUTTONS", $thtml);
1260  $this->parseCurrentBlock();
1261  }
1262  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
global $DIC
Definition: goto.php:24
setCurrentBlock($part="DEFAULT")
public
setVariable($variable, $value='')
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillWindowTitle()

ilGlobalTemplate::fillWindowTitle ( )

Definition at line 1282 of file class.ilGlobalTemplate.php.

References $DIC, $ilSetting, $title, setVariable(), and ilUtil\stripScriptHTML().

Referenced by getSpecial(), and renderPage().

1283  {
1284  global $DIC;
1285 
1286  $ilSetting = $DIC->settings();
1287 
1288  if ($this->header_page_title != "") {
1289  $title = ilUtil::stripScriptHTML($this->header_page_title);
1290  $this->setVariable("PAGETITLE", "- " . $title);
1291  }
1292 
1293  if ($ilSetting->get('short_inst_name') != "") {
1294  $this->setVariable(
1295  "WINDOW_TITLE",
1296  $ilSetting->get('short_inst_name')
1297  );
1298  } else {
1299  $this->setVariable(
1300  "WINDOW_TITLE",
1301  "ILIAS"
1302  );
1303  }
1304  }
static stripScriptHTML($a_str, $a_allow="", $a_rm_js=true)
strip only html tags (4.0) from text $allowed contains tags to be allowed, in format tags a and b ar...
global $DIC
Definition: goto.php:24
setVariable($variable, $value='')
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get()

ilGlobalTemplate::get (   $part = "DEFAULT")
Parameters
string
Returns
string

Implements ilGlobalTemplateInterface.

Definition at line 1786 of file class.ilGlobalTemplate.php.

1787  {
1788  return $this->template->get($part);
1789  }

◆ getCSSFiles()

ilGlobalTemplate::getCSSFiles ( )

Definition at line 1863 of file class.ilGlobalTemplate.php.

References $css_files.

1863  : array
1864  {
1865  return $this->css_files;
1866  }

◆ getHeaderActionMenu()

ilGlobalTemplate::getHeaderActionMenu ( )
private

Get header action menu.

Returns
int ref id

Definition at line 1017 of file class.ilGlobalTemplate.php.

References $header_action.

Referenced by fillHeader().

1018  {
1019  return $this->header_action;
1020  }
+ Here is the caller graph for this function:

◆ getInlineCSS()

ilGlobalTemplate::getInlineCSS ( )

Definition at line 1868 of file class.ilGlobalTemplate.php.

References $inline_css.

1868  : array
1869  {
1870  return $this->inline_css;
1871  }
$inline_css
Stores CSS to be included directly.

◆ getJSFiles()

ilGlobalTemplate::getJSFiles ( )

Definition at line 1858 of file class.ilGlobalTemplate.php.

References $js_files_batch.

1858  : array
1859  {
1860  return $this->js_files_batch;
1861  }

◆ getLoginTargetPar()

ilGlobalTemplate::getLoginTargetPar ( )
private

Get target parameter for login.

Definition at line 1344 of file class.ilGlobalTemplate.php.

Referenced by getMainMenu().

1345  {
1346  return $this->login_target_par;
1347  }
+ Here is the caller graph for this function:

◆ getMainMenu()

ilGlobalTemplate::getMainMenu ( )
private

Definition at line 270 of file class.ilGlobalTemplate.php.

References $DIC, getLoginTargetPar(), and variableExists().

Referenced by getSpecial(), and renderPage().

271  {
272  global $DIC;
273 
274  $ilMainMenu = $DIC["ilMainMenu"];
275 
276  if ($this->variableExists('MAINMENU')) {
277  $ilMainMenu->setLoginTargetPar($this->getLoginTargetPar());
278  $this->main_menu = $ilMainMenu->getHTML();
279  $this->main_menu_spacer = $ilMainMenu->getSpacerClass();
280  }
281  }
variableExists($a_variablename)
getLoginTargetPar()
Get target parameter for login.
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMessageTextForType()

ilGlobalTemplate::getMessageTextForType (   $m)
private
Parameters
$m
Returns
mixed|string

Definition at line 392 of file class.ilGlobalTemplate.php.

References $_SESSION, and $txt.

Referenced by fillMessage().

393  {
394  $txt = "";
395  if (isset($_SESSION[$m]) && $_SESSION[$m] != "") {
396  $txt = $_SESSION[$m];
397  } else {
398  if (isset($this->message[$m])) {
399  $txt = $this->message[$m];
400  }
401  }
402 
403  return $txt;
404  }
$_SESSION["AccountId"]
$txt
Definition: error.php:13
+ Here is the caller graph for this function:

◆ getOnLoadCodeForAsynch()

ilGlobalTemplate::getOnLoadCodeForAsynch ( )

Get js onload code for ajax calls.

Returns
string

Implements ilGlobalTemplateInterface.

Definition at line 473 of file class.ilGlobalTemplate.php.

References $i.

474  {
475  $js = "";
476  for ($i = 1; $i <= 3; $i++) {
477  if (is_array($this->on_load_code[$i])) {
478  foreach ($this->on_load_code[$i] as $code) {
479  $js .= $code . "\n";
480  }
481  }
482  }
483  if ($js) {
484  return '<script type="text/javascript">' . "\n" .
485  $js .
486  '</script>' . "\n";
487  }
488  }
$i
Definition: metadata.php:24

◆ getSpecial()

ilGlobalTemplate::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 
)
Parameters
string
Returns
string

Implements ilGlobalTemplateInterface.

Definition at line 1368 of file class.ilGlobalTemplate.php.

References $DIC, ilObjLanguageAccess\_saveUsages(), blockExists(), fillAdminPanel(), fillBodyClass(), fillContentLanguage(), fillCssFiles(), fillFooter(), fillHeader(), fillInlineCss(), fillJavaScriptFiles(), fillLeftContent(), fillLeftNav(), fillLightbox(), fillMainContent(), fillMainMenu(), fillMessage(), fillNewContentStyle(), fillOnLoadCode(), fillPermanentLink(), fillRightContent(), fillScreenReaderFocus(), fillSideIcons(), fillTabs(), fillToolbar(), fillWindowTitle(), getMainMenu(), getTabsHTML(), handleReferer(), initHelp(), parseCurrentBlock(), setCenterColumnClass(), and setCurrentBlock().

1376  {
1377  global $DIC;
1378 
1379  if ($add_error_mess) {
1380  $this->fillMessage();
1381  }
1382 
1383  if ($add_ilias_footer) {
1384  $this->fillFooter();
1385  }
1386 
1387  // set standard parts (tabs and title icon)
1388  if ($add_standard_elements) {
1389  if ($this->blockExists("content") && $a_tabs) {
1390  // determine default screen id
1391  $this->getTabsHTML();
1392  }
1393 
1394  // to get also the js files for the main menu
1395  $this->getMainMenu();
1396  $this->initHelp();
1397 
1398  // these fill blocks in tpl.main.html
1399  $this->fillCssFiles();
1400  $this->fillInlineCss();
1401  $this->fillBodyClass();
1402 
1403  // these fill just plain placeholder variables in tpl.main.html
1404  $this->setCurrentBlock("DEFAULT");
1405  $this->fillNewContentStyle();
1406  $this->fillContentLanguage();
1407  $this->fillWindowTitle();
1408 
1409  // these fill blocks in tpl.adm_content.html
1410  $this->fillHeader();
1411  $this->fillSideIcons();
1412  $this->fillScreenReaderFocus();
1413  $this->fillLeftContent();
1414  $this->fillLeftNav();
1415  $this->fillRightContent();
1416  $this->fillAdminPanel();
1417  $this->fillToolbar();
1418  $this->fillPermanentLink();
1419 
1420  $this->setCenterColumnClass();
1421 
1422  // late loading of javascipr files, since operations above may add files
1423  $this->fillJavaScriptFiles();
1424  $this->fillOnLoadCode();
1425 
1426  // these fill just plain placeholder variables in tpl.adm_content.html
1427  if ($this->blockExists("content")) {
1428  $this->setCurrentBlock("content");
1429  if ($a_tabs) {
1430  $this->fillTabs();
1431  }
1432  $this->fillMainContent();
1433  if ($a_main_menu) {
1434  $this->fillMainMenu();
1435  }
1436  $this->fillLightbox();
1437  $this->parseCurrentBlock();
1438  }
1439  }
1440 
1441  if ($handle_referer) {
1442  $this->handleReferer();
1443  }
1444 
1445  if ($part == "DEFAULT") {
1446  $html = $this->template->get();
1447  } else {
1448  $html = $this->template->get($part);
1449  }
1450 
1451  // save language usages as late as possible
1453 
1454  return $html;
1455  }
fillJavaScriptFiles($a_force=false)
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
fillFooter()
Fill the footer area.
fillMessage()
Fill message area.
fillLeftNav()
Fill left navigation frame.
handleReferer()
TODO: this is nice, but shouldn&#39;t be done here (-> maybe at the end of ilias.php!?, alex)
fillContentLanguage()
Add current user language to meta tags.
fillScreenReaderFocus()
Accessibility focus for screen readers.
fillLightbox()
Fill lightbox content.
fillInlineCss()
Fill in the inline css.
global $DIC
Definition: goto.php:24
fillSideIcons()
Fill side icons (upper icon, tree icon, webfolder icon)
fillNewContentStyle()
Fill Content Style.
setCurrentBlock($part="DEFAULT")
public
blockExists($a_blockname)
check if block exists in actual template private
fillAdminPanel()
Put admin panel into template:
static _saveUsages()
Store the collected language variable usages in the user session This should be called as late as pos...
fillOnLoadCode()
Fill add on load code.
fillPermanentLink()
Fill in permanent link.
fillCssFiles($a_force=false)
Fill in the css file tags.
+ Here is the call graph for this function:

◆ getTabsHTML()

ilGlobalTemplate::getTabsHTML ( )
private

Definition at line 1121 of file class.ilGlobalTemplate.php.

References $DIC, and blockExists().

Referenced by getSpecial(), and renderPage().

1122  {
1123  global $DIC;
1124 
1125  $ilTabs = $DIC["ilTabs"];
1126 
1127  if ($this->blockExists("tabs_outer_start")) {
1128  $this->sub_tabs_html = $ilTabs->getSubTabHTML();
1129  $this->tabs_html = $ilTabs->getHTML(true);
1130  }
1131  }
global $DIC
Definition: goto.php:24
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleReferer()

ilGlobalTemplate::handleReferer ( )
private

TODO: this is nice, but shouldn't be done here (-> maybe at the end of ilias.php!?, alex)

Definition at line 1499 of file class.ilGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

1500  {
1501  if (((substr(strrchr($_SERVER["PHP_SELF"], "/"), 1) != "error.php")
1502  && (substr(strrchr($_SERVER["PHP_SELF"], "/"), 1) != "adm_menu.php")
1503  && (substr(strrchr($_SERVER["PHP_SELF"], "/"), 1) != "chat.php"))) {
1504 
1505  // referer is modified if query string contains cmd=gateway and $_POST is not empty.
1506  // this is a workaround to display formular again in case of error and if the referer points to another page
1507  $url_parts = @parse_url($_SERVER["REQUEST_URI"]);
1508  if (!$url_parts) {
1509  $protocol = (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://';
1510  $host = $_SERVER['HTTP_HOST'];
1511  $path = $_SERVER['REQUEST_URI'];
1512  $url_parts = @parse_url($protocol . $host . $path);
1513  }
1514 
1515  if (isset($url_parts["query"]) && preg_match("/cmd=gateway/", $url_parts["query"]) && (isset($_POST["cmd"]["create"]))) {
1516  foreach ($_POST as $key => $val) {
1517  if (is_array($val)) {
1518  $val = key($val);
1519  }
1520 
1521  $str .= "&" . $key . "=" . $val;
1522  }
1523 
1524  $_SESSION["referer"] = preg_replace("/cmd=gateway/", substr($str, 1), $_SERVER["REQUEST_URI"]);
1525  $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1526  } elseif (isset($url_parts["query"]) && preg_match("/cmd=post/", $url_parts["query"]) && (isset($_POST["cmd"]["create"]))) {
1527  foreach ($_POST as $key => $val) {
1528  if (is_array($val)) {
1529  $val = key($val);
1530  }
1531 
1532  $str .= "&" . $key . "=" . $val;
1533  }
1534 
1535  $_SESSION["referer"] = preg_replace("/cmd=post/", substr($str, 1), $_SERVER["REQUEST_URI"]);
1536  if (isset($_GET['ref_id'])) {
1537  $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1538  } else {
1539  $_SESSION['referer_ref_id'] = 0;
1540  }
1541  } else {
1542  $_SESSION["referer"] = $_SERVER["REQUEST_URI"];
1543  if (isset($_GET['ref_id'])) {
1544  $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1545  } else {
1546  $_SESSION['referer_ref_id'] = 0;
1547  }
1548  }
1549 
1550  unset($_SESSION["error_post_vars"]);
1551  }
1552  }
$_SESSION["AccountId"]
$_GET["client_id"]
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10
$_POST["username"]
+ Here is the caller graph for this function:

◆ hideFooter()

ilGlobalTemplate::hideFooter ( )

Make the template hide the footer.

Implements ilGlobalTemplateInterface.

Definition at line 82 of file class.ilGlobalTemplate.php.

83  {
84  $this->show_footer = false;
85  }

◆ initHelp()

ilGlobalTemplate::initHelp ( )
private

Init help.

Definition at line 303 of file class.ilGlobalTemplate.php.

Referenced by getSpecial(), and renderPage().

304  {
305  include_once("./Services/Help/classes/class.ilHelpGUI.php");
306  //ilHelpGUI::initHelp($this);
307  }
+ Here is the caller graph for this function:

◆ loadStandardTemplate()

ilGlobalTemplate::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.

Implements ilGlobalTemplateInterface.

Definition at line 822 of file class.ilGlobalTemplate.php.

References addBlockFile(), ilUIFramework\init(), iljQueryUtil\initjQuery(), and iljQueryUtil\initjQueryUI().

823  {
824  if ($this->standard_template_loaded) {
825  return;
826  }
827 
828  // always load jQuery
829  include_once("./Services/jQuery/classes/class.iljQueryUtil.php");
832 
833  // always load ui framework
834  include_once("./Services/UICore/classes/class.ilUIFramework.php");
836 
837  $this->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
838  $this->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
839 
840  $this->standard_template_loaded = true;
841  }
addBlockFile($var, $block, $tplname, $in_module=false)
overwrites ITX::addBlockFile public
static initjQueryUI($a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components.txt for included components)
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.
+ Here is the call graph for this function:

◆ parseCurrentBlock()

ilGlobalTemplate::parseCurrentBlock (   $part = "DEFAULT")

Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public.

Parameters
string
Returns
string

Implements ilGlobalTemplateInterface.

Definition at line 1828 of file class.ilGlobalTemplate.php.

Referenced by fillAdminPanel(), fillBodyClass(), fillCssFiles(), fillHeader(), fillInlineCss(), fillJavascriptFile(), fillLeftContent(), fillLeftNav(), fillOnLoadCode(), fillPageFormAction(), fillRightContent(), fillSideIcons(), fillToolbar(), getSpecial(), renderPage(), ilForumExportGUI\renderPostHtml(), and setCenterColumnClass().

1829  {
1830  return $this->template->parseCurrentBlock($part);
1831  }
+ Here is the caller graph for this function:

◆ printToStdout()

ilGlobalTemplate::printToStdout (   $part = "DEFAULT",
  $a_fill_tabs = true,
  $a_skip_main_menu = false 
)
Parameters
string | bool$part
bool$a_fill_tabsfill template variable {TABS} with content of ilTabs
bool$a_skip_main_menu

Implements ilGlobalTemplateInterface.

Definition at line 1462 of file class.ilGlobalTemplate.php.

References $DIC, $http, exit, handleReferer(), ilYuiUtil\initDom(), ILIAS\Filesystem\Stream\Streams\ofString(), and renderPage().

1463  {
1464  global $DIC;
1465  $http = $DIC->http();
1466  switch ($http->request()->getHeaderLine('Accept')) {
1467  case 'application/json':
1468  $string = json_encode([
1469  self::MESSAGE_TYPE_SUCCESS => is_null($this->message[self::MESSAGE_TYPE_FAILURE]),
1470  'message' => '',
1471  ]);
1472  $stream = \ILIAS\Filesystem\Stream\Streams::ofString($string);
1473  $http->saveResponse($http->response()->withBody($stream));
1474  $http->sendResponse();
1475  exit;
1476  default:
1477  // include yahoo dom per default
1478  include_once("./Services/YUI/classes/class.ilYuiUtil.php");
1480 
1481  header('P3P: CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"');
1482  header("Content-type: text/html; charset=UTF-8");
1483 
1484  $html = $this->renderPage($part, $a_fill_tabs, $a_skip_main_menu, $DIC);
1485  // echo '<pre>' . print_r(array_keys(get_object_vars($this)), 1) . '</pre>';
1486  // exit;
1487  print $html;
1488 
1489  $this->handleReferer();
1490  break;
1491  }
1492  }
exit
Definition: login.php:29
handleReferer()
TODO: this is nice, but shouldn&#39;t be done here (-> maybe at the end of ilias.php!?, alex)
static initDom(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Dom.
renderPage($part, $a_fill_tabs, $a_skip_main_menu, \ILIAS\DI\Container $DIC)
global $DIC
Definition: goto.php:24
static ofString($string)
Creates a new stream with an initial value.
Definition: Streams.php:25
$http
Definition: raiseError.php:7
+ Here is the call graph for this function:

◆ printToString()

ilGlobalTemplate::printToString (   $part = "DEFAULT")

Definition at line 54 of file class.ilGlobalTemplate.php.

References $DIC, ilYuiUtil\initDom(), and renderPage().

54  : string
55  {
56  global $DIC;
58  $html = $this->renderPage($part, true, false, $DIC);
59  return $html;
60  }
static initDom(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Dom.
renderPage($part, $a_fill_tabs, $a_skip_main_menu, \ILIAS\DI\Container $DIC)
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:

◆ renderPage()

ilGlobalTemplate::renderPage (   $part,
  $a_fill_tabs,
  $a_skip_main_menu,
\ILIAS\DI\Container  $DIC 
)
Parameters
$part
$a_fill_tabs
$a_skip_main_menu
\ILIAS\DI\Container$DIC
Returns
string

Definition at line 674 of file class.ilGlobalTemplate.php.

References XapiProxy\$resp, ilObjLanguageAccess\_saveUsages(), blockExists(), fillAdminPanel(), fillBodyClass(), fillContentLanguage(), fillCssFiles(), fillFooter(), fillHeader(), fillInlineCss(), fillJavaScriptFiles(), fillLeftContent(), fillLeftNav(), fillLightbox(), fillMainContent(), fillMainMenu(), fillMessage(), fillNewContentStyle(), fillOnLoadCode(), fillPermanentLink(), fillRightContent(), fillScreenReaderFocus(), fillSideIcons(), fillTabs(), fillToolbar(), fillWindowTitle(), getMainMenu(), ilPluginAdmin\getPluginObject(), getTabsHTML(), IL_COMP_SERVICE, initHelp(), ilUIHookPluginGUI\KEEP, parseCurrentBlock(), setCenterColumnClass(), and setCurrentBlock().

Referenced by printToStdout(), and printToString().

674  : string
675  {
676  $this->fillMessage();
677 
678  // display ILIAS footer
679  if ($part !== false) {
680  $this->fillFooter();
681  }
682 
683  // set standard parts (tabs and title icon)
684  $this->fillBodyClass();
685 
686  // see #22992
687  $this->fillContentLanguage();
688 
689  if ($a_fill_tabs) {
690  if ($this->blockExists("content")) {
691  // determine default screen id
692  $this->getTabsHTML();
693  }
694  // to get also the js files for the main menu
695  if (!$a_skip_main_menu) {
696  $this->getMainMenu();
697  $this->initHelp();
698  }
699 
700  // these fill blocks in tpl.main.html
701  $this->fillCssFiles();
702  $this->fillInlineCss();
703  //$this->fillJavaScriptFiles();
704 
705  // these fill just plain placeholder variables in tpl.main.html
706  $this->setCurrentBlock("DEFAULT");
707  $this->fillNewContentStyle();
708  $this->fillWindowTitle();
709 
710  // these fill blocks in tpl.adm_content.html
711  $this->fillHeader();
712  $this->fillSideIcons();
713  $this->fillScreenReaderFocus();
714  $this->fillLeftContent();
715  $this->fillLeftNav();
716  $this->fillRightContent();
717  $this->fillAdminPanel();
718  $this->fillToolbar();
719  $this->fillPermanentLink();
720 
721  $this->setCenterColumnClass();
722 
723  // late loading of javascipr files, since operations above may add files
724  $this->fillJavaScriptFiles();
725  $this->fillOnLoadCode();
726 
727  // these fill just plain placeholder variables in tpl.adm_content.html
728  if ($this->blockExists("content")) {
729  $this->setCurrentBlock("content");
730  $this->fillTabs();
731  $this->fillMainContent();
732  $this->fillMainMenu();
733  $this->fillLightbox();
734  $this->parseCurrentBlock();
735  }
736  }
737 
738  if ($part == "DEFAULT" or is_bool($part)) {
739  $html = $this->template->getUnmodified();
740  } else {
741  $html = $this->template->getUnmodified($part);
742  }
743 
744  // Modification of html is done inline here and can't be done
745  // by ilTemplate, because the "phase" is template_show in this
746  // case here.
747  $ilPluginAdmin = $DIC["ilPluginAdmin"];
748  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
749  foreach ($pl_names as $pl) {
750  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
751  $gui_class = $ui_plugin->getUIClassInstance();
752 
753  $resp = $gui_class->getHTML(
754  "",
755  "template_show",
756  array("tpl_id" => $this->tplIdentifier, "tpl_obj" => $this, "html" => $html)
757  );
758 
759  if ($resp["mode"] != ilUIHookPluginGUI::KEEP) {
760  $html = $gui_class->modifyHTML($html, $resp);
761  }
762  }
763 
764  // save language usages as late as possible
766 
767  return $html;
768  }
fillJavaScriptFiles($a_force=false)
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
fillFooter()
Fill the footer area.
fillMessage()
Fill message area.
fillLeftNav()
Fill left navigation frame.
fillContentLanguage()
Add current user language to meta tags.
fillScreenReaderFocus()
Accessibility focus for screen readers.
fillLightbox()
Fill lightbox content.
fillInlineCss()
Fill in the inline css.
global $DIC
Definition: goto.php:24
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
fillSideIcons()
Fill side icons (upper icon, tree icon, webfolder icon)
fillNewContentStyle()
Fill Content Style.
setCurrentBlock($part="DEFAULT")
public
blockExists($a_blockname)
check if block exists in actual template private
fillAdminPanel()
Put admin panel into template:
static _saveUsages()
Store the collected language variable usages in the user session This should be called as late as pos...
fillOnLoadCode()
Fill add on load code.
fillPermanentLink()
Fill in permanent link.
const IL_COMP_SERVICE
fillCssFiles($a_force=false)
Fill in the css file tags.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetCss()

ilGlobalTemplate::resetCss ( )
private

Reset css files.

Definition at line 773 of file class.ilGlobalTemplate.php.

774  {
775  $this->css_files = array();
776  }

◆ resetHeaderBlock()

ilGlobalTemplate::resetHeaderBlock (   $a_reset_header_action = true)

Reset all header properties: title, icon, description, alerts, action menu.

Implements ilGlobalTemplateInterface.

Definition at line 1755 of file class.ilGlobalTemplate.php.

References enableDragDropFileUpload(), setAlertProperties(), setDescription(), setHeaderActionMenu(), setTitle(), and setTitleIcon().

1756  {
1757  $this->setTitle(null);
1758  $this->setTitleIcon(null);
1759  $this->setDescription(null);
1760  $this->setAlertProperties(array());
1761  $this->enableDragDropFileUpload(null);
1762 
1763  // see setFullscreenHeader()
1764  if ($a_reset_header_action) {
1765  $this->setHeaderActionMenu(null);
1766  }
1767  }
setTitleIcon($a_icon_path, $a_icon_desc="")
set title icon
setAlertProperties(array $a_props)
Set alert properties.
setTitle($a_title, $hidden=false)
Sets title in standard template.
setHeaderActionMenu($a_header)
Set header action menu.
enableDragDropFileUpload($a_ref_id)
Enables the file upload into this object by dropping a file.
setDescription($a_descr)
Sets descripton below title in standard template.
+ Here is the call graph for this function:

◆ resetJavascript()

ilGlobalTemplate::resetJavascript ( )

Reset javascript files.

Implements ilGlobalTemplateInterface.

Definition at line 496 of file class.ilGlobalTemplate.php.

497  {
498  $this->js_files = array();
499  $this->js_files_vp = array();
500  $this->js_files_batch = array();
501  }

◆ setAlertProperties()

ilGlobalTemplate::setAlertProperties ( array  $a_props)

Set alert properties.

Parameters
array$a_props
Returns
void

Implements ilGlobalTemplateInterface.

Definition at line 889 of file class.ilGlobalTemplate.php.

Referenced by clearHeader(), and resetHeaderBlock().

890  {
891  $this->title_alerts = $a_props;
892  }
+ Here is the caller graph for this function:

◆ setBodyClass()

ilGlobalTemplate::setBodyClass (   $a_class = "")

Implements ilGlobalTemplateInterface.

Definition at line 651 of file class.ilGlobalTemplate.php.

Referenced by ilIndependentGlobalTemplate\__construct(), and __construct().

652  {
653  $this->body_class = $a_class;
654  }
+ Here is the caller graph for this function:

◆ setCenterColumnClass()

ilGlobalTemplate::setCenterColumnClass ( )
private

Definition at line 1187 of file class.ilGlobalTemplate.php.

References blockExists(), parseCurrentBlock(), setCurrentBlock(), and setVariable().

Referenced by getSpecial(), and renderPage().

1188  {
1189  if (!$this->blockExists("center_col_width")) {
1190  return;
1191  }
1192  $center_column_class = "";
1193  if (trim($this->right_content) != "" && trim($this->left_content) != "") {
1194  $center_column_class = "two_side_col";
1195  } elseif (trim($this->right_content) != "" || trim($this->left_content) != "") {
1196  $center_column_class = "one_side_col";
1197  }
1198 
1199  switch ($center_column_class) {
1200  case "one_side_col": $center_column_class = "col-sm-9"; break;
1201  case "two_side_col": $center_column_class = "col-sm-6"; break;
1202  default: $center_column_class = "col-sm-12"; break;
1203  }
1204  if (trim($this->left_content) != "") {
1205  $center_column_class .= " col-sm-push-3";
1206  }
1207 
1208  $this->setCurrentBlock("center_col_width");
1209  $this->setVariable("CENTER_COL", $center_column_class);
1210  $this->parseCurrentBlock();
1211  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
setCurrentBlock($part="DEFAULT")
public
setVariable($variable, $value='')
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setContent()

ilGlobalTemplate::setContent (   $a_html)

Sets content for standard template.

Implements ilGlobalTemplateInterface.

Definition at line 1143 of file class.ilGlobalTemplate.php.

1144  {
1145  if ($a_html != "") {
1146  $this->main_content = $a_html;
1147  }
1148  }

◆ setCurrentBlock()

ilGlobalTemplate::setCurrentBlock (   $part = "DEFAULT")

public

Parameters
string
Returns
???

Implements ilGlobalTemplateInterface.

Definition at line 1806 of file class.ilGlobalTemplate.php.

Referenced by fillAdminPanel(), fillBodyClass(), fillCssFiles(), fillHeader(), fillInlineCss(), fillJavascriptFile(), fillLeftContent(), fillLeftNav(), fillOnLoadCode(), fillPageFormAction(), fillRightContent(), fillSideIcons(), fillToolbar(), getSpecial(), renderPage(), ilForumExportGUI\renderPostHtml(), and setCenterColumnClass().

1807  {
1808  return $this->template->setCurrentBlock($part);
1809  }
+ Here is the caller graph for this function:

◆ setDescription()

ilGlobalTemplate::setDescription (   $a_descr)

Sets descripton below title in standard template.

Implements ilGlobalTemplateInterface.

Definition at line 870 of file class.ilGlobalTemplate.php.

Referenced by clearHeader(), and resetHeaderBlock().

871  {
872  $this->title_desc = $a_descr;
873  }
+ Here is the caller graph for this function:

◆ setHeaderActionMenu()

ilGlobalTemplate::setHeaderActionMenu (   $a_header)

Set header action menu.

Parameters
string$a_gui$a_header

Implements ilGlobalTemplateInterface.

Definition at line 919 of file class.ilGlobalTemplate.php.

Referenced by resetHeaderBlock().

920  {
921  $this->header_action = $a_header;
922  }
+ Here is the caller graph for this function:

◆ setHeaderPageTitle()

ilGlobalTemplate::setHeaderPageTitle (   $a_title)

Sets the title of the page (for browser window).

Implements ilGlobalTemplateInterface.

Definition at line 932 of file class.ilGlobalTemplate.php.

933  {
934  $this->header_page_title = $a_title;
935  }

◆ setLeftContent()

ilGlobalTemplate::setLeftContent (   $a_html)

Sets content of left column.

Implements ilGlobalTemplateInterface.

Definition at line 1153 of file class.ilGlobalTemplate.php.

1154  {
1155  $this->left_content = $a_html;
1156  }

◆ setLeftNavContent()

ilGlobalTemplate::setLeftNavContent (   $a_content)

Sets content of left navigation column.

Implements ilGlobalTemplateInterface.

Definition at line 1161 of file class.ilGlobalTemplate.php.

1162  {
1163  $this->left_nav_content = $a_content;
1164  }

◆ setLocator()

ilGlobalTemplate::setLocator ( )

Insert locator.

Implements ilGlobalTemplateInterface.

Definition at line 1032 of file class.ilGlobalTemplate.php.

References $DIC, ilMainMenuGUI\MODE_TOPBAR_ONLY, ilMainMenuGUI\MODE_TOPBAR_REDUCED, and setVariable().

1033  {
1034  global $DIC;
1035 
1036  $ilMainMenu = $DIC["ilMainMenu"];
1037  $ilLocator = $DIC["ilLocator"];
1038 
1039  $ilPluginAdmin = $DIC["ilPluginAdmin"];
1040 
1041  // blog/portfolio
1042  if ($ilMainMenu->getMode() == ilMainMenuGUI::MODE_TOPBAR_REDUCED ||
1043  $ilMainMenu->getMode() == ilMainMenuGUI::MODE_TOPBAR_ONLY) {
1044  $this->setVariable("LOCATOR", "");
1045  return;
1046  }
1047 
1048  $html = "";
1049  if (is_object($ilPluginAdmin)) {
1050  include_once("./Services/UIComponent/classes/class.ilUIHookProcessor.php");
1051  $uip = new ilUIHookProcessor(
1052  "Services/Locator",
1053  "main_locator",
1054  array("locator_gui" => $ilLocator)
1055  );
1056  if (!$uip->replaced()) {
1057  $html = $ilLocator->getHTML();
1058  }
1059  $html = $uip->getHTML($html);
1060  } else {
1061  $html = $ilLocator->getHTML();
1062  }
1063 
1064  $this->setVariable("LOCATOR", $html);
1065  }
global $DIC
Definition: goto.php:24
setVariable($variable, $value='')
+ Here is the call graph for this function:

◆ setLoginTargetPar()

ilGlobalTemplate::setLoginTargetPar (   $a_val)

Set target parameter for login (public sector).

This is used by the main menu

Implements ilGlobalTemplateInterface.

Definition at line 1336 of file class.ilGlobalTemplate.php.

1337  {
1338  $this->login_target_par = $a_val;
1339  }

◆ setOnScreenMessage()

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

Set a message to be displayed to the user.

Please use ilUtil::sendInfo(), ilUtil::sendSuccess() and ilUtil::sendFailure()

Parameters
string$a_type::MESSAGE_TYPE_SUCCESS, ::MESSAGE_TYPE_FAILURE,, ::MESSAGE_TYPE_QUESTION, ::MESSAGE_TYPE_INFO
string$a_txtThe message to be sent
bool$a_keepKeep this message over one redirect

Implements ilGlobalTemplateInterface.

Definition at line 346 of file class.ilGlobalTemplate.php.

References $_SESSION.

347  {
348  if (!in_array($a_type, self::$message_types) || $a_txt == "") {
349  return;
350  }
351  if (!$a_keep) {
352  $this->message[$a_type] = $a_txt;
353  } else {
354  $_SESSION[$a_type] = $a_txt;
355  }
356  }
$_SESSION["AccountId"]

◆ setPageFormAction()

ilGlobalTemplate::setPageFormAction (   $a_action)

Implements ilGlobalTemplateInterface.

Definition at line 1311 of file class.ilGlobalTemplate.php.

1312  {
1313  $this->page_form_action = $a_action;
1314  }

◆ setPermanentLink()

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

Implements ilGlobalTemplateInterface.

Definition at line 1722 of file class.ilGlobalTemplate.php.

1723  {
1724  $this->permanent_link = array(
1725  "type" => $a_type,
1726  "id" => $a_id,
1727  "append" => $a_append,
1728  "target" => $a_target,
1729  "title" => $a_title);
1730  }

◆ setRightContent()

ilGlobalTemplate::setRightContent (   $a_html)

Sets content of right column.

Implements ilGlobalTemplateInterface.

Definition at line 1182 of file class.ilGlobalTemplate.php.

1183  {
1184  $this->right_content = $a_html;
1185  }

◆ setSubTabs()

ilGlobalTemplate::setSubTabs (   $a_tabs_html)

sets subtabs in standard template

Implements ilGlobalTemplateInterface.

Definition at line 1101 of file class.ilGlobalTemplate.php.

References setVariable().

1102  {
1103  $this->setVariable("SUB_TABS", $a_tabs_html);
1104  }
setVariable($variable, $value='')
+ Here is the call graph for this function:

◆ setTabs()

ilGlobalTemplate::setTabs (   $a_tabs_html)

sets tabs in standard template

Implements ilGlobalTemplateInterface.

Definition at line 1087 of file class.ilGlobalTemplate.php.

References blockExists(), setVariable(), and touchBlock().

1088  {
1089  if ($a_tabs_html != "" && $this->blockExists("tabs_outer_start")) {
1090  $this->touchBlock("tabs_outer_start");
1091  $this->touchBlock("tabs_outer_end");
1092  $this->touchBlock("tabs_inner_start");
1093  $this->touchBlock("tabs_inner_end");
1094  $this->setVariable("TABS", $a_tabs_html);
1095  }
1096  }
touchBlock($block)
overwrites ITX::touchBlock.
setVariable($variable, $value='')
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:

◆ setTitle()

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

Sets title in standard template.

Will override the header_page_title.

Implements ilGlobalTemplateInterface.

Definition at line 861 of file class.ilGlobalTemplate.php.

Referenced by clearHeader(), and resetHeaderBlock().

862  {
863  $this->title = $a_title;
864  $this->header_page_title = $a_title;
865  }
+ Here is the caller graph for this function:

◆ setTitleIcon()

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

set title icon

Implements ilGlobalTemplateInterface.

Definition at line 878 of file class.ilGlobalTemplate.php.

Referenced by clearHeader(), and resetHeaderBlock().

879  {
880  $this->icon_desc = $a_icon_desc;
881  $this->icon_path = $a_icon_path;
882  }
+ Here is the caller graph for this function:

◆ setTreeFlatIcon()

ilGlobalTemplate::setTreeFlatIcon (   $a_link,
  $a_mode 
)

set tree/flat icon

Parameters
stringlink target
strongmode ("tree" | "flat")

Implements ilGlobalTemplateInterface.

Definition at line 1624 of file class.ilGlobalTemplate.php.

1625  {
1626  $this->tree_flat_link = $a_link;
1627  $this->tree_flat_mode = $a_mode;
1628  }

◆ setVariable()

◆ touchBlock()

ilGlobalTemplate::touchBlock (   $block)

overwrites ITX::touchBlock.

public

Parameters
string
Returns
???

Implements ilGlobalTemplateInterface.

Definition at line 1817 of file class.ilGlobalTemplate.php.

Referenced by fillLeftNav(), fillPageFormAction(), fillScreenReaderFocus(), fillSideIcons(), fillTabs(), and setTabs().

1818  {
1819  return $this->template->touchBlock($block);
1820  }
+ Here is the caller graph for this function:

◆ variableExists()

ilGlobalTemplate::variableExists (   $a_variablename)
private

Definition at line 1796 of file class.ilGlobalTemplate.php.

Referenced by fillMainMenu(), and getMainMenu().

1797  {
1798  return $this->template->variableExists($a_variablename);
1799  }
+ Here is the caller graph for this function:

Field Documentation

◆ $admin_panel_arrow

ilGlobalTemplate::$admin_panel_arrow = null
protected

Definition at line 1663 of file class.ilGlobalTemplate.php.

◆ $admin_panel_bottom

ilGlobalTemplate::$admin_panel_bottom = null
protected

Definition at line 1664 of file class.ilGlobalTemplate.php.

◆ $admin_panel_commands_toolbar

ilGlobalTemplate::$admin_panel_commands_toolbar = null
protected

Definition at line 1662 of file class.ilGlobalTemplate.php.

Referenced by fillAdminPanel().

◆ $css_files

ilGlobalTemplate::$css_files = array()
protected

Definition at line 587 of file class.ilGlobalTemplate.php.

Referenced by getCSSFiles().

◆ $header_action

ilGlobalTemplate::$header_action
protected

Definition at line 854 of file class.ilGlobalTemplate.php.

Referenced by getHeaderActionMenu().

◆ $header_page_title

ilGlobalTemplate::$header_page_title = ""
protected

Definition at line 850 of file class.ilGlobalTemplate.php.

◆ $inline_css

ilGlobalTemplate::$inline_css = array()
protected

Stores CSS to be included directly.

array

Definition at line 593 of file class.ilGlobalTemplate.php.

Referenced by getInlineCSS().

◆ $js_files

ilGlobalTemplate::$js_files = array(0 => "./Services/JavaScript/js/Basic.js")
protected

Definition at line 416 of file class.ilGlobalTemplate.php.

◆ $js_files_batch

ilGlobalTemplate::$js_files_batch = array("./Services/JavaScript/js/Basic.js" => 1)
protected

Definition at line 428 of file class.ilGlobalTemplate.php.

Referenced by getJSFiles().

◆ $js_files_vp

ilGlobalTemplate::$js_files_vp = array("./Services/JavaScript/js/Basic.js" => true)
protected

Definition at line 422 of file class.ilGlobalTemplate.php.

◆ $lightbox

ilGlobalTemplate::$lightbox = array()
protected

Definition at line 20 of file class.ilGlobalTemplate.php.

◆ $main_content

ilGlobalTemplate::$main_content = ""
protected

Definition at line 18 of file class.ilGlobalTemplate.php.

◆ $main_menu

ilGlobalTemplate::$main_menu
protected

Definition at line 263 of file class.ilGlobalTemplate.php.

◆ $main_menu_spacer

ilGlobalTemplate::$main_menu_spacer
protected

Definition at line 268 of file class.ilGlobalTemplate.php.

◆ $message

ilGlobalTemplate::$message = array()
protected

Definition at line 333 of file class.ilGlobalTemplate.php.

◆ $message_types

ilGlobalTemplate::$message_types
staticprotected
Initial value:
= array(
self::MESSAGE_TYPE_FAILURE,
self::MESSAGE_TYPE_INFO,
self::MESSAGE_TYPE_SUCCESS,
self::MESSAGE_TYPE_QUESTION,
)

Definition at line 326 of file class.ilGlobalTemplate.php.

◆ $page_form_action

ilGlobalTemplate::$page_form_action = ""
protected

Definition at line 16 of file class.ilGlobalTemplate.php.

◆ $permanent_link

ilGlobalTemplate::$permanent_link = false
protected

Definition at line 17 of file class.ilGlobalTemplate.php.

◆ $show_footer

ilGlobalTemplate::$show_footer = true
private

Definition at line 77 of file class.ilGlobalTemplate.php.

◆ $standard_template_loaded

ilGlobalTemplate::$standard_template_loaded = false
protected

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

◆ $sub_tabs_html

ilGlobalTemplate::$sub_tabs_html = ""
protected

Definition at line 1082 of file class.ilGlobalTemplate.php.

◆ $tabs_html

ilGlobalTemplate::$tabs_html = ""
protected

Definition at line 1077 of file class.ilGlobalTemplate.php.

◆ $template

ilGlobalTemplate::$template
protected

Definition at line 26 of file class.ilGlobalTemplate.php.

◆ $title

ilGlobalTemplate::$title = ""
protected

Definition at line 851 of file class.ilGlobalTemplate.php.

Referenced by fillHeader(), and fillWindowTitle().

◆ $title_alerts

ilGlobalTemplate::$title_alerts = array()
protected

Definition at line 853 of file class.ilGlobalTemplate.php.

◆ $title_desc

ilGlobalTemplate::$title_desc = ""
protected

Definition at line 852 of file class.ilGlobalTemplate.php.

◆ $tree_flat_link

ilGlobalTemplate::$tree_flat_link = ""
protected

Definition at line 15 of file class.ilGlobalTemplate.php.

◆ MESSAGE_TYPE_FAILURE

const ilGlobalTemplate::MESSAGE_TYPE_FAILURE = 'failure'

◆ MESSAGE_TYPE_INFO

const ilGlobalTemplate::MESSAGE_TYPE_INFO = "info"

◆ MESSAGE_TYPE_QUESTION

const ilGlobalTemplate::MESSAGE_TYPE_QUESTION = "question"

◆ MESSAGE_TYPE_SUCCESS

const ilGlobalTemplate::MESSAGE_TYPE_SUCCESS = "success"

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