ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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 1690 of file class.ilGlobalTemplate.php.

1691  {
1692  $this->admin_panel_commands_toolbar = $toolb;
1693  $this->admin_panel_arrow = $a_arrow;
1694  $this->admin_panel_bottom = $a_bottom_panel;
1695  }

◆ 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 1860 of file class.ilGlobalTemplate.php.

Referenced by loadStandardTemplate().

1861  {
1862  return $this->template->addBlockFile($var, $block, $tplname, $in_module);
1863  }
+ 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 1652 of file class.ilGlobalTemplate.php.

1653  {
1654  $this->lightbox[$a_id] = $a_html;
1655  }

◆ 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 1871 of file class.ilGlobalTemplate.php.

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

1872  {
1873  return $this->template->blockExists($a_blockname);
1874  }
+ 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 1790 of file class.ilGlobalTemplate.php.

Referenced by resetHeaderBlock().

1791  {
1792  $this->enable_fileupload = $a_ref_id;
1793  }
+ 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 1702 of file class.ilGlobalTemplate.php.

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

Referenced by getSpecial(), and renderPage().

1703  {
1704  global $DIC;
1705  $lng = $DIC->language();
1706 
1707  if ($this->admin_panel_commands_toolbar === null) {
1708  return;
1709  }
1710 
1712  assert($toolb instanceof \ilToolbarGUI);
1713 
1714  // Add arrow if desired.
1715  if ($this->admin_panel_arrow) {
1716  $toolb->setLeadingImage(ilUtil::getImagePath("arrow_upright.svg"), $lng->txt("actions"));
1717  }
1718 
1719  $this->fillPageFormAction();
1720 
1721  // Add top admin bar.
1722  $this->setCurrentBlock("adm_view_components");
1723  $this->setVariable("ADM_PANEL1", $toolb->getHTML());
1724  $this->parseCurrentBlock();
1725 
1726  // Add bottom admin bar if user wants one.
1727  if ($this->admin_panel_bottom) {
1728  $this->setCurrentBlock("adm_view_components2");
1729 
1730  // Replace previously set arrow image.
1731  if ($this->admin_panel_arrow) {
1732  $toolb->setLeadingImage(ilUtil::getImagePath("arrow_downright.svg"), $lng->txt("actions"));
1733  }
1734 
1735  $this->setVariable("ADM_PANEL2", $toolb->getHTML());
1736  $this->parseCurrentBlock();
1737  }
1738  }
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)
setCurrentBlock($part="DEFAULT")
public
setVariable($variable, $value='')
$DIC
Definition: xapitoken.php:46
+ 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 1272 of file class.ilGlobalTemplate.php.

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

Referenced by getSpecial(), and renderPage().

1273  {
1274  global $DIC;
1275 
1276  $lng = $DIC->language();
1277  $ilUser = $DIC->user();
1278 
1279  $contentLanguage = 'en';
1280  $rtl = array('ar','fa','ur','he');//, 'de'); //make a list of rtl languages
1281  /* rtl-review: add "de" for testing with ltr lang shown in rtl
1282  * and set unicode-bidi to bidi-override for mirror effect */
1283  $textdir = 'ltr';
1284  if (is_object($ilUser)) {
1285  if ($ilUser->getLanguage()) {
1286  $contentLanguage = $ilUser->getLanguage();
1287  } elseif (is_object($lng)) {
1288  $contentLanguage = $lng->getDefaultLanguage();
1289  }
1290  }
1291  $this->setVariable('META_CONTENT_LANGUAGE', $contentLanguage);
1292  if (in_array($contentLanguage, $rtl)) {
1293  $textdir = 'rtl';
1294  }
1295  $this->setVariable('LANGUAGE_DIRECTION', $textdir);
1296  return true;
1297  }
$lng
$ilUser
Definition: imgupload.php:18
setVariable($variable, $value='')
$DIC
Definition: xapitoken.php:46
+ 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, $ilCtrl, $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)
global $ilCtrl
Definition: ilias.php:18
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
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:18
global $ilDB
$DIC
Definition: xapitoken.php:46
$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(), ilUtil\stripScriptHTML(), and touchBlock().

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  $this->touchBlock("head_action");
984  }
985 
986  if (count((array) $this->title_alerts)) {
987  foreach ($this->title_alerts as $alert) {
988  $this->setCurrentBlock('header_alert');
989  if (!($alert['propertyNameVisible'] === false)) {
990  $this->setVariable('H_PROP', $alert['property'] . ':');
991  }
992  $this->setVariable('H_VALUE', $alert['value']);
993  $this->parseCurrentBlock();
994  }
995  }
996 
997  // add file upload drop zone in header
998  if ($this->enable_fileupload != null) {
999  $ref_id = $this->enable_fileupload;
1000  $upload_id = "dropzone_" . $ref_id;
1001 
1002  include_once("./Services/FileUpload/classes/class.ilFileUploadGUI.php");
1003  $upload = new ilFileUploadGUI($upload_id, $ref_id, true);
1004 
1005  $this->setVariable("FILEUPLOAD_DROPZONE_ID", " id=\"$upload_id\"");
1006 
1007  $this->setCurrentBlock("header_fileupload");
1008  $this->setVariable("HEADER_FILEUPLOAD_SCRIPT", $upload->getHTML());
1009  $this->parseCurrentBlock();
1010  }
1011  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
getHeaderActionMenu()
Get header action menu.
touchBlock($block)
overwrites ITX::touchBlock.
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
setCurrentBlock($part="DEFAULT")
public
setVariable($variable, $value='')
$DIC
Definition: xapitoken.php:46
+ 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 $ilSetting
Definition: privfeed.php:17
$DIC
Definition: xapitoken.php:46
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 1221 of file class.ilGlobalTemplate.php.

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

Referenced by getSpecial(), and renderPage().

1222  {
1223  if (trim($this->left_content) != "") {
1224  $this->setCurrentBlock("left_column");
1225  $this->setVariable("LEFT_CONTENT", $this->left_content);
1226  $left_col_class = (trim($this->right_content) == "")
1227  ? "col-sm-3 col-sm-pull-9"
1228  : "col-sm-3 col-sm-pull-6";
1229  $this->setVariable("LEFT_COL_CLASS", $left_col_class);
1230  $this->parseCurrentBlock();
1231  }
1232  }
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 1170 of file class.ilGlobalTemplate.php.

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

Referenced by getSpecial(), and renderPage().

1171  {
1172  if (trim($this->left_nav_content) != "") {
1173  $this->setCurrentBlock("left_nav");
1174  $this->setVariable("LEFT_NAV_CONTENT", $this->left_nav_content);
1175  $this->parseCurrentBlock();
1176  $this->touchBlock("left_nav_space");
1177  }
1178  }
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 1663 of file class.ilGlobalTemplate.php.

References setVariable().

Referenced by getSpecial(), and renderPage().

1664  {
1665  $html = "";
1666 
1667  foreach ($this->lightbox as $lb) {
1668  $html .= $lb;
1669  }
1670  $this->setVariable("LIGHTBOX", $html);
1671  }
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 1214 of file class.ilGlobalTemplate.php.

References setVariable().

Referenced by getSpecial(), and renderPage().

1215  {
1216  if (trim($this->main_content) != "") {
1217  $this->setVariable("ADM_CONTENT", $this->main_content);
1218  }
1219  }
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)
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
$DIC
Definition: xapitoken.php:46
+ 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.
$txt
Definition: error.php:13
setVariable($variable, $value='')
$DIC
Definition: xapitoken.php:46
+ 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 1333 of file class.ilGlobalTemplate.php.

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

Referenced by fillAdminPanel().

1334  {
1335  if ($this->page_form_action != "") {
1336  $this->setCurrentBlock("page_form_start");
1337  $this->setVariable("PAGE_FORM_ACTION", $this->page_form_action);
1338  $this->parseCurrentBlock();
1339  $this->touchBlock("page_form_end");
1340  }
1341  }
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 1753 of file class.ilGlobalTemplate.php.

References setVariable().

Referenced by getSpecial(), and renderPage().

1754  {
1755  if (is_array($this->permanent_link)) {
1756  include_once("./Services/PermanentLink/classes/class.ilPermanentLinkGUI.php");
1757  $plinkgui = new ilPermanentLinkGUI(
1758  $this->permanent_link["type"],
1759  $this->permanent_link["id"],
1760  $this->permanent_link["append"],
1761  $this->permanent_link["target"]
1762  );
1763  if ($this->permanent_link["title"] != "") {
1764  $plinkgui->setTitle($this->permanent_link["title"]);
1765  }
1766  $this->setVariable("PRMLINK", $plinkgui->getHTML());
1767  }
1768  }
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 1234 of file class.ilGlobalTemplate.php.

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

Referenced by getSpecial(), and renderPage().

1235  {
1236  if (trim($this->right_content) != "") {
1237  $this->setCurrentBlock("right_column");
1238  $this->setVariable("RIGHT_CONTENT", $this->right_content);
1239  $this->parseCurrentBlock();
1240  }
1241  }
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 1576 of file class.ilGlobalTemplate.php.

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

Referenced by getSpecial(), and renderPage().

1577  {
1578  global $DIC;
1579 
1580  $ilUser = $DIC->user();
1581 
1582  if (is_object($ilUser) && $ilUser->getPref("screen_reader_optimization") && $this->blockExists("sr_focus")) {
1583  $this->touchBlock("sr_focus");
1584  }
1585  }
touchBlock($block)
overwrites ITX::touchBlock.
$ilUser
Definition: imgupload.php:18
$DIC
Definition: xapitoken.php:46
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:

◆ fillSideIcons()

ilGlobalTemplate::fillSideIcons ( )
private

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

Definition at line 1590 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().

1591  {
1592  global $DIC;
1593 
1594  $ilSetting = $DIC->settings();
1595 
1596  $lng = $DIC->language();
1597 
1598  // tree/flat icon
1599  if ($this->tree_flat_link != "") {
1600  if ($this->left_nav_content != "") {
1601  $this->touchBlock("tree_lns");
1602  }
1603 
1604  $this->setCurrentBlock("tree_mode");
1605  $this->setVariable("LINK_MODE", $this->tree_flat_link);
1606  if ($ilSetting->get("tree_frame") == "right") {
1607  if ($this->tree_flat_mode == "tree") {
1608  $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
1609  $this->setVariable("RIGHT", "Right");
1610  } else {
1611  $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
1612  $this->setVariable("RIGHT", "Right");
1613  }
1614  } else {
1615  if ($this->tree_flat_mode == "tree") {
1616  $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
1617  } else {
1618  $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
1619  }
1620  }
1621  $this->setVariable("ALT_TREE", $lng->txt($this->tree_flat_mode . "view"));
1622  $this->setVariable("TARGET_TREE", ilFrameTargetInfo::_getFrame("MainContent"));
1623  include_once("./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
1624  $this->setVariable(
1625  "TREE_ACC_KEY",
1626  ilAccessKeyGUI::getAttribute(($this->tree_flat_mode == "tree")
1629  );
1630  $this->parseCurrentBlock();
1631  }
1632 
1633  $this->setCurrentBlock("tree_icons");
1634  $this->parseCurrentBlock();
1635  }
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)
static _getFrame($a_class, $a_type='')
Get content frame name.
setCurrentBlock($part="DEFAULT")
public
setVariable($variable, $value='')
global $ilSetting
Definition: privfeed.php:17
$DIC
Definition: xapitoken.php:46
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 1107 of file class.ilGlobalTemplate.php.

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

Referenced by getSpecial(), and renderPage().

1108  {
1109  if ($this->blockExists("tabs_outer_start")) {
1110  $this->touchBlock("tabs_outer_start");
1111  $this->touchBlock("tabs_outer_end");
1112  $this->touchBlock("tabs_inner_start");
1113  $this->touchBlock("tabs_inner_end");
1114 
1115  if ($this->tabs_html != "") {
1116  $this->setVariable("TABS", $this->tabs_html);
1117  }
1118  $this->setVariable("SUB_TABS", $this->sub_tabs_html);
1119  }
1120  }
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 1250 of file class.ilGlobalTemplate.php.

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

Referenced by getSpecial(), and renderPage().

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

◆ fillWindowTitle()

ilGlobalTemplate::fillWindowTitle ( )

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

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

Referenced by getSpecial(), and renderPage().

1300  {
1301  global $DIC;
1302 
1303  $ilSetting = $DIC->settings();
1304 
1305  if ($this->header_page_title != "") {
1306  $title = ilUtil::stripScriptHTML($this->header_page_title);
1307  $this->setVariable("PAGETITLE", "- " . $title);
1308  }
1309 
1310  if ($ilSetting->get('short_inst_name') != "") {
1311  $this->setVariable(
1312  "WINDOW_TITLE",
1313  $ilSetting->get('short_inst_name')
1314  );
1315  } else {
1316  $this->setVariable(
1317  "WINDOW_TITLE",
1318  "ILIAS"
1319  );
1320  }
1321  }
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...
setVariable($variable, $value='')
global $ilSetting
Definition: privfeed.php:17
$DIC
Definition: xapitoken.php:46
+ 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 1804 of file class.ilGlobalTemplate.php.

1805  {
1806  return $this->template->get($part);
1807  }

◆ getCSSFiles()

ilGlobalTemplate::getCSSFiles ( )

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

References $css_files.

1881  : array
1882  {
1883  return $this->css_files;
1884  }

◆ getHeaderActionMenu()

ilGlobalTemplate::getHeaderActionMenu ( )
private

Get header action menu.

Returns
int ref id

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

References $header_action.

Referenced by fillHeader().

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

◆ getInlineCSS()

ilGlobalTemplate::getInlineCSS ( )

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

References $inline_css.

1886  : array
1887  {
1888  return $this->inline_css;
1889  }
$inline_css
Stores CSS to be included directly.

◆ getJSFiles()

ilGlobalTemplate::getJSFiles ( )

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

References $js_files_batch.

1876  : array
1877  {
1878  return $this->js_files_batch;
1879  }

◆ getLoginTargetPar()

ilGlobalTemplate::getLoginTargetPar ( )
private

Get target parameter for login.

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

Referenced by getMainMenu().

1362  {
1363  return $this->login_target_par;
1364  }
+ 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.
$DIC
Definition: xapitoken.php:46
+ 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 1385 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().

1393  {
1394  global $DIC;
1395 
1396  if ($add_error_mess) {
1397  $this->fillMessage();
1398  }
1399 
1400  if ($add_ilias_footer) {
1401  $this->fillFooter();
1402  }
1403 
1404  // set standard parts (tabs and title icon)
1405  if ($add_standard_elements) {
1406  if ($this->blockExists("content") && $a_tabs) {
1407  // determine default screen id
1408  $this->getTabsHTML();
1409  }
1410 
1411  // to get also the js files for the main menu
1412  $this->getMainMenu();
1413  $this->initHelp();
1414 
1415  // these fill blocks in tpl.main.html
1416  $this->fillCssFiles();
1417  $this->fillInlineCss();
1418  $this->fillBodyClass();
1419 
1420  // these fill just plain placeholder variables in tpl.main.html
1421  $this->setCurrentBlock("DEFAULT");
1422  $this->fillNewContentStyle();
1423  $this->fillContentLanguage();
1424  $this->fillWindowTitle();
1425 
1426  // these fill blocks in tpl.adm_content.html
1427  $this->fillHeader();
1428  $this->fillSideIcons();
1429  $this->fillScreenReaderFocus();
1430  $this->fillLeftContent();
1431  $this->fillLeftNav();
1432  $this->fillRightContent();
1433  $this->fillAdminPanel();
1434  $this->fillToolbar();
1435  $this->fillPermanentLink();
1436 
1437  $this->setCenterColumnClass();
1438 
1439  // late loading of javascipr files, since operations above may add files
1440  $this->fillJavaScriptFiles();
1441  $this->fillOnLoadCode();
1442 
1443  // these fill just plain placeholder variables in tpl.adm_content.html
1444  if ($this->blockExists("content")) {
1445  $this->setCurrentBlock("content");
1446  if ($a_tabs) {
1447  $this->fillTabs();
1448  }
1449  $this->fillMainContent();
1450  if ($a_main_menu) {
1451  $this->fillMainMenu();
1452  }
1453  $this->fillLightbox();
1454  $this->parseCurrentBlock();
1455  }
1456  }
1457 
1458  if ($handle_referer) {
1459  $this->handleReferer();
1460  }
1461 
1462  if ($part == "DEFAULT") {
1463  $html = $this->template->get();
1464  } else {
1465  $html = $this->template->get($part);
1466  }
1467 
1468  // save language usages as late as possible
1470 
1471  return $html;
1472  }
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.
fillSideIcons()
Fill side icons (upper icon, tree icon, webfolder icon)
fillNewContentStyle()
Fill Content Style.
setCurrentBlock($part="DEFAULT")
public
$DIC
Definition: xapitoken.php:46
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 1122 of file class.ilGlobalTemplate.php.

References $DIC, and blockExists().

Referenced by getSpecial(), and renderPage().

1123  {
1124  global $DIC;
1125 
1126  $ilTabs = $DIC["ilTabs"];
1127 
1128  if ($this->blockExists("tabs_outer_start")) {
1129  $this->sub_tabs_html = $ilTabs->getSubTabHTML();
1130  $this->tabs_html = $ilTabs->getHTML(true);
1131  }
1132  }
$DIC
Definition: xapitoken.php:46
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 1516 of file class.ilGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

1517  {
1518  if (((substr(strrchr($_SERVER["PHP_SELF"], "/"), 1) != "error.php")
1519  && (substr(strrchr($_SERVER["PHP_SELF"], "/"), 1) != "adm_menu.php")
1520  && (substr(strrchr($_SERVER["PHP_SELF"], "/"), 1) != "chat.php"))) {
1521  $_SESSION["post_vars"] = $_POST;
1522 
1523  // referer is modified if query string contains cmd=gateway and $_POST is not empty.
1524  // this is a workaround to display formular again in case of error and if the referer points to another page
1525  $url_parts = @parse_url($_SERVER["REQUEST_URI"]);
1526  if (!$url_parts) {
1527  $protocol = (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://';
1528  $host = $_SERVER['HTTP_HOST'];
1529  $path = $_SERVER['REQUEST_URI'];
1530  $url_parts = @parse_url($protocol . $host . $path);
1531  }
1532 
1533  if (isset($url_parts["query"]) && preg_match("/cmd=gateway/", $url_parts["query"]) && (isset($_POST["cmd"]["create"]))) {
1534  foreach ($_POST as $key => $val) {
1535  if (is_array($val)) {
1536  $val = key($val);
1537  }
1538 
1539  $str .= "&" . $key . "=" . $val;
1540  }
1541 
1542  $_SESSION["referer"] = preg_replace("/cmd=gateway/", substr($str, 1), $_SERVER["REQUEST_URI"]);
1543  $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1544  } elseif (isset($url_parts["query"]) && preg_match("/cmd=post/", $url_parts["query"]) && (isset($_POST["cmd"]["create"]))) {
1545  foreach ($_POST as $key => $val) {
1546  if (is_array($val)) {
1547  $val = key($val);
1548  }
1549 
1550  $str .= "&" . $key . "=" . $val;
1551  }
1552 
1553  $_SESSION["referer"] = preg_replace("/cmd=post/", substr($str, 1), $_SERVER["REQUEST_URI"]);
1554  if (isset($_GET['ref_id'])) {
1555  $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1556  } else {
1557  $_SESSION['referer_ref_id'] = 0;
1558  }
1559  } else {
1560  $_SESSION["referer"] = $_SERVER["REQUEST_URI"];
1561  if (isset($_GET['ref_id'])) {
1562  $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1563  } else {
1564  $_SESSION['referer_ref_id'] = 0;
1565  }
1566  }
1567 
1568  unset($_SESSION["error_post_vars"]);
1569  }
1570  }
$_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 1846 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().

1847  {
1848  return $this->template->parseCurrentBlock($part);
1849  }
+ 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 1479 of file class.ilGlobalTemplate.php.

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

1480  {
1481  global $DIC;
1482  $http = $DIC->http();
1483  switch ($http->request()->getHeaderLine('Accept')) {
1484  case 'application/json':
1485  $string = json_encode([
1486  self::MESSAGE_TYPE_SUCCESS => is_null($this->message[self::MESSAGE_TYPE_FAILURE]),
1487  'message' => '',
1488  ]);
1489  $stream = \ILIAS\Filesystem\Stream\Streams::ofString($string);
1490  $http->saveResponse($http->response()->withBody($stream));
1491  $http->sendResponse();
1492  exit;
1493  default:
1494  // include yahoo dom per default
1495  include_once("./Services/YUI/classes/class.ilYuiUtil.php");
1497 
1498  header('P3P: CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"');
1499  header("Content-type: text/html; charset=UTF-8");
1500 
1501  $html = $this->renderPage($part, $a_fill_tabs, $a_skip_main_menu, $DIC);
1502  // echo '<pre>' . print_r(array_keys(get_object_vars($this)), 1) . '</pre>';
1503  // exit;
1504  print $html;
1505 
1506  $this->handleReferer();
1507  break;
1508  }
1509  }
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)
static ofString($string)
Creates a new stream with an initial value.
Definition: Streams.php:30
$http
Definition: raiseError.php:7
$DIC
Definition: xapitoken.php:46
+ 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)
$DIC
Definition: xapitoken.php:46
+ 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.
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
$DIC
Definition: xapitoken.php:46
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 1773 of file class.ilGlobalTemplate.php.

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

1774  {
1775  $this->setTitle(null);
1776  $this->setTitleIcon(null);
1777  $this->setDescription(null);
1778  $this->setAlertProperties(array());
1779  $this->enableDragDropFileUpload(null);
1780 
1781  // see setFullscreenHeader()
1782  if ($a_reset_header_action) {
1783  $this->setHeaderActionMenu(null);
1784  }
1785  }
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 1188 of file class.ilGlobalTemplate.php.

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

Referenced by getSpecial(), and renderPage().

1189  {
1190  if (!$this->blockExists("center_col_width")) {
1191  return;
1192  }
1193  $center_column_class = "";
1194  if (trim($this->right_content) != "" && trim($this->left_content) != "") {
1195  $center_column_class = "two_side_col";
1196  } elseif (trim($this->right_content) != "" || trim($this->left_content) != "") {
1197  $center_column_class = "one_side_col";
1198  }
1199 
1200  switch ($center_column_class) {
1201  case "one_side_col": $center_column_class = "col-sm-9"; break;
1202  case "two_side_col": $center_column_class = "col-sm-6"; break;
1203  default: $center_column_class = "col-sm-12"; break;
1204  }
1205  if (trim($this->left_content) != "") {
1206  $center_column_class .= " col-sm-push-3";
1207  }
1208 
1209  $this->setCurrentBlock("center_col_width");
1210  $this->setVariable("CENTER_COL", $center_column_class);
1211  $this->parseCurrentBlock();
1212  }
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 1144 of file class.ilGlobalTemplate.php.

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

◆ setCurrentBlock()

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

public

Parameters
string
Returns
???

Implements ilGlobalTemplateInterface.

Definition at line 1824 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().

1825  {
1826  return $this->template->setCurrentBlock($part);
1827  }
+ 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 1154 of file class.ilGlobalTemplate.php.

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

◆ setLeftNavContent()

ilGlobalTemplate::setLeftNavContent (   $a_content)

Sets content of left navigation column.

Implements ilGlobalTemplateInterface.

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

References $a_content.

1163  {
1164  $this->left_nav_content = $a_content;
1165  }
$a_content
Definition: workflow.php:93

◆ setLocator()

ilGlobalTemplate::setLocator ( )

Insert locator.

Implements ilGlobalTemplateInterface.

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

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

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

1354  {
1355  $this->login_target_par = $a_val;
1356  }

◆ 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, and $a_type.

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"]
$a_type
Definition: workflow.php:92

◆ setPageFormAction()

ilGlobalTemplate::setPageFormAction (   $a_action)

Implements ilGlobalTemplateInterface.

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

1329  {
1330  $this->page_form_action = $a_action;
1331  }

◆ setPermanentLink()

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

Implements ilGlobalTemplateInterface.

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

References $a_type.

1741  {
1742  $this->permanent_link = array(
1743  "type" => $a_type,
1744  "id" => $a_id,
1745  "append" => $a_append,
1746  "target" => $a_target,
1747  "title" => $a_title);
1748  }
$a_type
Definition: workflow.php:92

◆ setRightContent()

ilGlobalTemplate::setRightContent (   $a_html)

Sets content of right column.

Implements ilGlobalTemplateInterface.

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

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

◆ setSubTabs()

ilGlobalTemplate::setSubTabs (   $a_tabs_html)

sets subtabs in standard template

Implements ilGlobalTemplateInterface.

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

References setVariable().

1103  {
1104  $this->setVariable("SUB_TABS", $a_tabs_html);
1105  }
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 1088 of file class.ilGlobalTemplate.php.

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

1089  {
1090  if ($a_tabs_html != "" && $this->blockExists("tabs_outer_start")) {
1091  $this->touchBlock("tabs_outer_start");
1092  $this->touchBlock("tabs_outer_end");
1093  $this->touchBlock("tabs_inner_start");
1094  $this->touchBlock("tabs_inner_end");
1095  $this->setVariable("TABS", $a_tabs_html);
1096  }
1097  }
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 1642 of file class.ilGlobalTemplate.php.

1643  {
1644  $this->tree_flat_link = $a_link;
1645  $this->tree_flat_mode = $a_mode;
1646  }

◆ setVariable()

◆ touchBlock()

ilGlobalTemplate::touchBlock (   $block)

overwrites ITX::touchBlock.

public

Parameters
string
Returns
???

Implements ilGlobalTemplateInterface.

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

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

1836  {
1837  return $this->template->touchBlock($block);
1838  }
+ Here is the caller graph for this function:

◆ variableExists()

ilGlobalTemplate::variableExists (   $a_variablename)
private

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

Referenced by fillMainMenu(), and getMainMenu().

1815  {
1816  return $this->template->variableExists($a_variablename);
1817  }
+ Here is the caller graph for this function:

Field Documentation

◆ $admin_panel_arrow

ilGlobalTemplate::$admin_panel_arrow = null
protected

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

◆ $admin_panel_bottom

ilGlobalTemplate::$admin_panel_bottom = null
protected

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

◆ $admin_panel_commands_toolbar

ilGlobalTemplate::$admin_panel_commands_toolbar = null
protected

Definition at line 1680 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 1083 of file class.ilGlobalTemplate.php.

◆ $tabs_html

ilGlobalTemplate::$tabs_html = ""
protected

Definition at line 1078 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'

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

◆ MESSAGE_TYPE_INFO

const ilGlobalTemplate::MESSAGE_TYPE_INFO = "info"

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

◆ MESSAGE_TYPE_QUESTION

const ilGlobalTemplate::MESSAGE_TYPE_QUESTION = "question"

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

◆ MESSAGE_TYPE_SUCCESS

const ilGlobalTemplate::MESSAGE_TYPE_SUCCESS = "success"

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


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