ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 (string $file, bool $flag1, bool $flag2, string $in_module='', string $vars=self::DEFAULT_BLOCK, bool $plugin=false, bool $a_use_cache=true)
 
 printToString (string $part=self::DEFAULT_BLOCK)
 
 hideFooter ()
 Make the template hide the footer. More...
 
 setOnScreenMessage (string $a_type, string $a_txt, bool $a_keep=false)
 Set a message to be displayed to the user. More...
 
 addJavaScript (string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
 Add a javascript file that should be included in the header. More...
 
 addOnLoadCode (string $a_code, int $a_batch=2)
 Add on load code. More...
 
 getOnLoadCodeForAsynch ()
 Get js onload code for ajax calls. More...
 
 resetJavascript ()
 Reset javascript files. More...
 
 fillJavaScriptFiles (bool $a_force=false)
 Probably adds javascript files. More...
 
 fillOnLoadCode ()
 
 addCss (string $a_css_file, string $media="screen")
 Add a css file that should be included in the header. More...
 
 addInlineCss (string $a_css, string $media="screen")
 Add a css file that should be included in the header. More...
 
 fillCssFiles (bool $a_force=false)
 
 setBodyClass (string $a_class="")
 Sets the body-tags class. More...
 
 fillBodyClass ()
 
 renderPage (string $part, bool $a_fill_tabs, bool $a_skip_main_menu, 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 (string $a_title, bool $hidden=false)
 Sets title in standard template. More...
 
 setDescription (string $a_descr)
 Sets descripton below title in standard template. More...
 
 setTitleIcon (string $a_icon_path, string $a_icon_desc="")
 set title icon More...
 
 setAlertProperties (array $a_props)
 Set alert properties. More...
 
 clearHeader ()
 Clear header. More...
 
 setHeaderActionMenu (string $a_header)
 Set header action menu. More...
 
 setHeaderPageTitle (string $a_title)
 Sets the title of the page (for browser window). More...
 
 setLocator ()
 Insert locator. More...
 
 setTabs (string $a_tabs_html)
 
 setSubTabs (string $a_tabs_html)
 sets subtabs in standard template More...
 
 fillTabs ()
 
 setContent (string $a_html)
 Sets content for standard template. More...
 
 setLeftContent (string $a_html)
 Sets content of left column. More...
 
 setLeftNavContent (string $a_content)
 Sets content of left navigation column. More...
 
 setRightContent (string $a_html)
 Sets content of right column. More...
 
 fillContentLanguage ()
 
 fillWindowTitle ()
 
 setPageFormAction (string $a_action)
 Sets the pages form action. More...
 
 setLoginTargetPar (string $a_val)
 Set target parameter for login (public sector). More...
 
 getSpecial (string $part=self::DEFAULT_BLOCK, bool $add_error_mess=false, bool $handle_referer=false, bool $add_ilias_footer=false, bool $add_standard_elements=false, bool $a_main_menu=true, bool $a_tabs=true)
 
 printToStdout (string $part=self::DEFAULT_BLOCK, bool $a_fill_tabs=true, bool $a_skip_main_menu=false)
 
 fillScreenReaderFocus ()
 
 setTreeFlatIcon (string $a_link, string $a_mode)
 Sets a tree or flat icon. More...
 
 addAdminPanelToolbar (ilToolbarGUI $toolb, bool $a_bottom_panel=true, bool $a_arrow=false)
 Add admin panel commands as toolbar. More...
 
 setPermanentLink (string $a_type, ?int $a_id, string $a_append="", string $a_target="", string $a_title="")
 Generates and sets a permanent ilias link. More...
 
 resetHeaderBlock (bool $a_reset_header_action=true)
 Reset all header properties: title, icon, description, alerts, action menu. More...
 
 setFileUploadRefId (int $a_ref_id)
 Enables the file upload into this object by dropping a file. More...
 
 get (string $part=self::DEFAULT_BLOCK)
 
 setVariable (string $variable, $value='')
 Sets the given variable to the given value. More...
 
 setCurrentBlock (string $part=self::DEFAULT_BLOCK)
 
 touchBlock (string $block)
 
 parseCurrentBlock (string $part=self::DEFAULT_BLOCK)
 
 addBlockFile (string $var, string $block, string $template_name, string $in_module=null)
 
 blockExists (string $a_blockname)
 check if block exists in actual template More...
 
 getJSFiles ()
 
 getCSSFiles ()
 
- Public Member Functions inherited from ilGlobalTemplateInterface
 printToString ()
 Use this method to get the finally rendered page as string. More...
 

Protected Member Functions

 getMainMenu ()
 
 fillMainMenu ()
 
 initHelp ()
 
 fillMessage ()
 
 getMessageTextForType (string $type)
 
 fillJavascriptFile (string $file, string $vers)
 
 resetCss ()
 
 fillInlineCss ()
 
 fillNewContentStyle ()
 
 fillHeader ()
 
 getHeaderActionMenu ()
 
 getTabsHTML ()
 
 fillLeftNav ()
 
 setCenterColumnClass ()
 
 fillMainContent ()
 
 fillLeftContent ()
 
 fillRightContent ()
 
 fillToolbar ()
 
 fillPageFormAction ()
 
 getLoginTargetPar ()
 
 fillSideIcons ()
 
 fillAdminPanel ()
 
 fillPermanentLink ()
 
 variableExists (string $a_variablename)
 

Protected Attributes

ilTemplate $template
 
ilToolbarGUI $admin_panel_commands_toolbar = null
 
array $js_files
 
array $js_files_vp
 
array $js_files_batch
 
array $css_files = []
 
array $inline_css = []
 
string $in_module
 
string $template_name
 
string $body_class = ''
 
string $tree_flat_link = ""
 
string $page_form_action = ""
 
array $permanent_link = []
 
string $main_content = ""
 
array $lightbox = []
 
bool $standard_template_loaded = false
 
string $main_menu = ''
 
string $main_menu_spacer = ''
 
array $messages = []
 
bool $show_footer = true
 
array $on_load_code = []
 
string $left_nav_content = ''
 
string $tree_flat_mode = ''
 
bool $admin_panel_arrow = false
 
bool $admin_panel_bottom = false
 
int $enable_fileupload = null
 
string $header_page_title = ""
 
string $title = ""
 
string $title_desc = ""
 
array $title_alerts = []
 
string $header_action = ''
 
string $icon_desc = ''
 
string $icon_path = ''
 
string $tabs_html = ""
 
string $sub_tabs_html = ""
 
string $left_content = ''
 
string $right_content = ''
 
string $login_target_par = ''
 

Additional Inherited Members

- Data Fields inherited from ilGlobalTemplateInterface
const MESSAGE_TYPE_FAILURE = 'failure'
 
const MESSAGE_TYPE_SUCCESS = "success"
 
const MESSAGE_TYPE_QUESTION = "question"
 
const MESSAGE_TYPE_INFO = "info"
 
const MESSAGE_TYPES
 
const DEFAULT_BLOCK = 'DEFAULT'
 

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
Thibeau Fuhrer thibe.nosp@m.au@s.nosp@m.r.sol.nosp@m.utio.nosp@m.ns

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

Constructor & Destructor Documentation

◆ __construct()

ilGlobalTemplate::__construct ( string  $file,
bool  $flag1,
bool  $flag2,
string  $in_module = '',
string  $vars = self::DEFAULT_BLOCK,
bool  $plugin = false,
bool  $a_use_cache = true 
)
Exceptions
ilTemplateException|ilSystemStyleException

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

References $in_module, XapiProxy\$plugin, and setBodyClass().

113  {
114  $this->setBodyClass("std");
115  $this->template_name = $file;
116  $this->in_module = $in_module;
117  $this->template = new ilTemplate(
118  $file,
119  $flag1,
120  $flag2,
121  $in_module,
122  $vars,
123  $plugin,
124  $a_use_cache
125  );
126  }
setBodyClass(string $a_class="")
Sets the body-tags class.
+ Here is the call graph for this function:

Member Function Documentation

◆ addAdminPanelToolbar()

ilGlobalTemplate::addAdminPanelToolbar ( ilToolbarGUI  $toolbar,
bool  $is_bottom_panel = true,
bool  $has_arrow = false 
)

Add admin panel commands as toolbar.

Parameters
bool$is_bottom_panelif the panel should be rendered at the bottom of the page as well.
bool$has_arrowif the panel should be rendered with an arrow icon.

Implements ilGlobalTemplateInterface.

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

1068  : void
1069  {
1070  $this->admin_panel_commands_toolbar = $toolb;
1071  $this->admin_panel_arrow = $a_arrow;
1072  $this->admin_panel_bottom = $a_bottom_panel;
1073  }

◆ addBlockFile()

ilGlobalTemplate::addBlockFile ( string  $var,
string  $block,
string  $template_name,
string  $in_module = null 
)
Exceptions
ilTemplateException

Implements ilGlobalTemplateInterface.

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

Referenced by loadStandardTemplate().

1211  : bool
1212  {
1213  return $this->template->addBlockFile($var, $block, $template_name, $in_module);
1214  }
+ Here is the caller graph for this function:

◆ addCss()

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

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

Implements ilGlobalTemplateInterface.

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

319  : void
320  {
321  if (!array_key_exists($a_css_file . $media, $this->css_files)) {
322  $this->css_files[$a_css_file . $media] = [
323  "file" => $a_css_file,
324  "media" => $media,
325  ];
326  }
327  }

◆ addInlineCss()

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

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

Implements ilGlobalTemplateInterface.

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

329  : void
330  {
331  $this->inline_css[] = [
332  "css" => $a_css,
333  "media" => $media,
334  ];
335  }

◆ addJavaScript()

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

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

Implements ilGlobalTemplateInterface.

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

194  : void
195  {
196  // three batches currently
197  if ($a_batch < 1 || $a_batch > 3) {
198  $a_batch = 2;
199  }
200 
201  // ensure jquery files being loaded first
202  if (is_int(strpos($a_js_file, "Services/jQuery")) ||
203  is_int(strpos($a_js_file, "/jquery.js")) ||
204  is_int(strpos($a_js_file, "/jquery/")) ||
205  is_int(strpos($a_js_file, "/jquery-ui/")) ||
206  is_int(strpos($a_js_file, "/jquery-min.js"))
207  ) {
208  $a_batch = 0;
209  }
210 
211  if (!in_array($a_js_file, $this->js_files, true)) {
212  $this->js_files[] = $a_js_file;
213  $this->js_files_vp[$a_js_file] = $a_add_version_parameter;
214  $this->js_files_batch[$a_js_file] = $a_batch;
215  }
216  }

◆ addOnLoadCode()

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

Add on load code.

Implements ilGlobalTemplateInterface.

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

218  : void
219  {
220  // three batches currently
221  if ($a_batch < 1 || $a_batch > 3) {
222  $a_batch = 2;
223  }
224 
225  $this->on_load_code[$a_batch][] = $a_code;
226  }

◆ blockExists()

ilGlobalTemplate::blockExists ( string  $block_name)

check if block exists in actual template

Parameters
string$block_name

Implements ilGlobalTemplateInterface.

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

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

1216  : bool
1217  {
1218  return $this->template->blockExists($a_blockname);
1219  }
+ Here is the caller graph for this function:

◆ clearHeader()

ilGlobalTemplate::clearHeader ( )

Clear header.

Implements ilGlobalTemplateInterface.

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

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

569  : void
570  {
571  $this->setTitle("");
572  $this->setTitleIcon("");
573  $this->setDescription("");
574  $this->setAlertProperties([]);
575  }
setAlertProperties(array $a_props)
Set alert properties.
setDescription(string $a_descr)
Sets descripton below title in standard template.
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
+ Here is the call graph for this function:

◆ fillAdminPanel()

ilGlobalTemplate::fillAdminPanel ( )
protected
Exceptions
ilTemplateException

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

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

Referenced by getSpecial(), and renderPage().

1078  : void
1079  {
1080  global $DIC;
1081  $lng = $DIC->language();
1082 
1083  if ($this->admin_panel_commands_toolbar === null) {
1084  return;
1085  }
1086 
1088 
1089  // Add arrow if desired.
1090  if ($this->admin_panel_arrow) {
1091  $toolb->setLeadingImage(ilUtil::getImagePath("nav/arrow_upright.svg"), $lng->txt("actions"));
1092  }
1093 
1094  $this->fillPageFormAction();
1095 
1096  // Add top admin bar.
1097  $this->setCurrentBlock("adm_view_components");
1098  $this->setVariable("ADM_PANEL1", $toolb->getHTML());
1099  $this->parseCurrentBlock();
1100 
1101  // Add bottom admin bar if user wants one.
1102  if ($this->admin_panel_bottom) {
1103  $this->setCurrentBlock("adm_view_components2");
1104 
1105  // Replace previously set arrow image.
1106  if ($this->admin_panel_arrow) {
1107  $toolb->setLeadingImage(ilUtil::getImagePath("nav/arrow_downright.svg"), $lng->txt("actions"));
1108  }
1109 
1110  $this->setVariable("ADM_PANEL2", $toolb->getHTML());
1111  $this->parseCurrentBlock();
1112  }
1113  }
ilToolbarGUI $admin_panel_commands_toolbar
setVariable(string $variable, $value='')
Sets the given variable to the given value.
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
setLeadingImage(string $a_img, string $a_alt)
parseCurrentBlock(string $part=self::DEFAULT_BLOCK)
global $DIC
Definition: feed.php:28
$lng
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillBodyClass()

ilGlobalTemplate::fillBodyClass ( )
Exceptions
ilTemplateException

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

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

Referenced by getSpecial(), and renderPage().

367  : void
368  {
369  if ($this->body_class !== "" && $this->blockExists("body_class")) {
370  $this->setCurrentBlock("body_class");
371  $this->setVariable("BODY_CLASS", $this->body_class);
372  $this->parseCurrentBlock();
373  }
374  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $part=self::DEFAULT_BLOCK)
blockExists(string $a_blockname)
check if block exists in actual template
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillContentLanguage()

ilGlobalTemplate::fillContentLanguage ( )

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

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

Referenced by getSpecial(), and renderPage().

857  : void
858  {
859  global $DIC;
860  $lng = $DIC->language();
861 
862  if (is_object($lng)) {
863  $this->setVariable('META_CONTENT_LANGUAGE', $lng->getContentLanguage());
864  $this->setVariable('LANGUAGE_DIRECTION', $lng->getTextDirection());
865  }
866  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
global $DIC
Definition: feed.php:28
$lng
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillCssFiles()

ilGlobalTemplate::fillCssFiles ( bool  $a_force = false)
Exceptions
ilTemplateException

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

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

Referenced by getSpecial(), and renderPage().

340  : void
341  {
342  if (!$this->blockExists("css_file")) {
343  return;
344  }
345  foreach ($this->css_files as $css) {
346  $filename = $css["file"];
347  if (strpos($filename, "?") > 0) {
348  $filename = substr($filename, 0, strpos($filename, "?"));
349  }
350  if ($a_force || is_file($filename)) {
351  $this->setCurrentBlock("css_file");
352  $this->setVariable("CSS_FILE", $css["file"]);
353  $this->setVariable("CSS_MEDIA", $css["media"]);
354  $this->parseCurrentBlock();
355  }
356  }
357  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $part=self::DEFAULT_BLOCK)
blockExists(string $a_blockname)
check if block exists in actual template
$filename
Definition: buildRTE.php:78
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillHeader()

ilGlobalTemplate::fillHeader ( )
protected
Exceptions
ilTemplateException

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

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

Referenced by getSpecial(), and renderPage().

590  : void
591  {
592  global $DIC;
593 
594  $lng = $DIC->language();
595  $header = $this->getHeaderActionMenu();
596 
597  $header_tpl = new ilTemplate('tpl.il_header.html', true, true);
598 
599  if ($this->icon_path !== "") {
600  $header_tpl->setCurrentBlock("header_image");
601  $header_tpl->setVariable("IMG_HEADER", $this->icon_path);
602  $header_tpl->parseCurrentBlock();
603  $header = true;
604  }
605 
606  if ($this->title !== "") {
607  $title = ilUtil::stripScriptHTML($this->title);
608  $header_tpl->setVariable("HEADER", $title);
609 
610  $header = true;
611  }
612 
613  if ($header !== '') {
614  $header_tpl->setCurrentBlock("header_image");
615  $header_tpl->parseCurrentBlock();
616  }
617 
618  if ($this->title_desc !== "") {
619  $header_tpl->setCurrentBlock("header_desc");
620  $header_tpl->setVariable("H_DESCRIPTION", $this->title_desc);
621  $header_tpl->parseCurrentBlock();
622  }
623 
624  if ($header !== '') {
625  $header_tpl->setCurrentBlock("head_action_inner");
626  $header_tpl->setVariable("HEAD_ACTION", $header);
627  $header_tpl->parseCurrentBlock();
628  }
629 
630  foreach ($this->title_alerts as $alert) {
631  $header_tpl->setCurrentBlock('header_alert');
632  if (!($alert['propertyNameVisible'] === false)) {
633  $header_tpl->setVariable('H_PROP', $alert['property'] . ':');
634  }
635  $header_tpl->setVariable('H_VALUE', $alert['value']);
636  $header_tpl->parseCurrentBlock();
637  }
638 
639  // add file upload drop zone in header
640  if ($this->enable_fileupload !== null) {
641  $file_upload = new ilObjFileUploadDropzone(
642  $this->enable_fileupload,
643  $header_tpl->get()
644  );
645 
646  $this->setVariable(
647  "IL_DROPZONE_HEADER",
648  $file_upload->getDropzoneHtml()
649  );
650  } else {
651  $this->setVariable("IL_HEADER", $header_tpl->get());
652  }
653  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
static stripScriptHTML(string $a_str, string $a_allow="", bool $a_rm_js=true)
global $DIC
Definition: feed.php:28
$lng
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillInlineCss()

ilGlobalTemplate::fillInlineCss ( )
protected
Exceptions
ilTemplateException

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

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

Referenced by getSpecial(), and renderPage().

490  : void
491  {
492  if (!$this->blockExists("css_inline")) {
493  return;
494  }
495  foreach ($this->inline_css as $css) {
496  $this->setCurrentBlock("css_inline");
497  $this->setVariable("CSS_INLINE", $css["css"]);
498  $this->parseCurrentBlock();
499  }
500  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $part=self::DEFAULT_BLOCK)
blockExists(string $a_blockname)
check if block exists in actual template
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillJavascriptFile()

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

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

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

Referenced by fillJavaScriptFiles().

308  : void
309  {
310  $this->setCurrentBlock("js_file");
311  if ($this->js_files_vp[$file]) {
312  $this->setVariable("JS_FILE", ilUtil::appendUrlParameterString($file, $vers));
313  } else {
314  $this->setVariable("JS_FILE", $file);
315  }
316  $this->parseCurrentBlock();
317  }
static appendUrlParameterString(string $a_url, string $a_par, bool $xml_style=false)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $part=self::DEFAULT_BLOCK)
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillJavaScriptFiles()

ilGlobalTemplate::fillJavaScriptFiles ( bool  $a_force = false)

Probably adds javascript files.

Implements ilGlobalTemplateInterface.

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

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

Referenced by getSpecial(), and renderPage().

254  : void
255  {
256  global $DIC;
257 
258  $ilSetting = $DIC->settings();
259 
260  $vers = '';
261  if (is_object($ilSetting)) { // maybe this one can be removed
262  $vers = "vers=" . str_replace([".", " "], "-", ILIAS_VERSION);
263 
264  if (DEVMODE) {
265  $vers .= '-' . time();
266  }
267  }
268  if ($this->blockExists("js_file")) {
269  // three batches
270  for ($i = 0; $i <= 3; $i++) {
271  reset($this->js_files);
272  foreach ($this->js_files as $file) {
273  if ($this->js_files_batch[$file] === $i) {
274  if ($a_force ||
275  is_file($file) ||
276  strpos($file, "http") === 0 ||
277  strpos($file, "//") === 0
278  ) {
279  $this->fillJavascriptFile($file, $vers);
280  } elseif (strpos($file, './') === 0) { // #13962
281  $url_parts = parse_url($file);
282  if (is_file($url_parts['path'])) {
283  $this->fillJavascriptFile($file, $vers);
284  }
285  }
286  }
287  }
288  }
289  }
290  }
const ILIAS_VERSION
global $DIC
Definition: feed.php:28
blockExists(string $a_blockname)
check if block exists in actual template
fillJavascriptFile(string $file, string $vers)
global $ilSetting
Definition: privfeed.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillLeftContent()

ilGlobalTemplate::fillLeftContent ( )
protected
Exceptions
ilTemplateException

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

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

Referenced by getSpecial(), and renderPage().

815  : void
816  {
817  if (trim($this->left_content) !== "") {
818  $this->setCurrentBlock("left_column");
819  $this->setVariable("LEFT_CONTENT", trim($this->left_content));
820  $left_col_class = (trim($this->right_content) === "")
821  ? "col-sm-3 col-sm-pull-9"
822  : "col-sm-3 col-sm-pull-6";
823  $this->setVariable("LEFT_COL_CLASS", $left_col_class);
824  $this->parseCurrentBlock();
825  }
826  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $part=self::DEFAULT_BLOCK)
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillLeftNav()

ilGlobalTemplate::fillLeftNav ( )
protected
Exceptions
ilTemplateException

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

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

Referenced by getSpecial(), and renderPage().

753  : void
754  {
755  if (trim($this->left_nav_content) !== "") {
756  $this->setCurrentBlock("left_nav");
757  $this->setVariable("LEFT_NAV_CONTENT", trim($this->left_nav_content));
758  $this->parseCurrentBlock();
759  $this->touchBlock("left_nav_space");
760  }
761  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $part=self::DEFAULT_BLOCK)
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMainContent()

ilGlobalTemplate::fillMainContent ( )
protected

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

References setVariable().

Referenced by getSpecial(), and renderPage().

805  : void
806  {
807  if (trim($this->main_content) !== "") {
808  $this->setVariable("ADM_CONTENT", trim($this->main_content));
809  }
810  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMainMenu()

ilGlobalTemplate::fillMainMenu ( )
protected

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

Referenced by getSpecial(), and renderPage().

144  : void
145  {
146  }
+ Here is the caller graph for this function:

◆ fillMessage()

ilGlobalTemplate::fillMessage ( )
protected

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

References $out, $txt, ilSession\clear(), getMessageTextForType(), ilUtil\getSystemMessageHTML(), and setVariable().

Referenced by getSpecial(), and renderPage().

168  : void
169  {
170  $out = "";
171  foreach (self::MESSAGE_TYPES as $type) {
172  $txt = $this->getMessageTextForType($type);
173  if (null !== $txt) {
175  }
176 
177  ilSession::clear($type);
178  }
179 
180  if ($out !== "") {
181  $this->setVariable("MESSAGE", $out);
182  }
183  }
static getSystemMessageHTML(string $a_txt, string $a_type="info")
Get HTML for a system message.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
$out
Definition: buildRTE.php:24
$txt
Definition: error.php:14
getMessageTextForType(string $type)
static clear(string $a_var)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillNewContentStyle()

ilGlobalTemplate::fillNewContentStyle ( )
protected

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

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

Referenced by getSpecial(), and renderPage().

502  : void
503  {
504  $this->setVariable(
505  "LOCATION_NEWCONTENT_STYLESHEET_TAG",
506  '<link rel="stylesheet" type="text/css" href="' .
508  . '" />'
509  );
510  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
static getNewContentStyleSheetLocation(string $mode="output")
get full style sheet file name (path inclusive) of current user
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillOnLoadCode()

ilGlobalTemplate::fillOnLoadCode ( )

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

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

Referenced by getSpecial(), and renderPage().

292  : void
293  {
294  for ($i = 1; $i <= 3; $i++) {
295  if (isset($this->on_load_code[$i])) {
296  $this->setCurrentBlock("on_load_code");
297  foreach ($this->on_load_code[$i] as $code) {
298  $this->setCurrentBlock("on_load_code_inner");
299  $this->setVariable("OLCODE", $code);
300  $this->parseCurrentBlock();
301  }
302  $this->setCurrentBlock("on_load_code");
303  $this->parseCurrentBlock();
304  }
305  }
306  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $part=self::DEFAULT_BLOCK)
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillPageFormAction()

ilGlobalTemplate::fillPageFormAction ( )
protected
Exceptions
ilTemplateException

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

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

Referenced by fillAdminPanel().

900  : void
901  {
902  if ($this->page_form_action !== "") {
903  $this->setCurrentBlock("page_form_start");
904  $this->setVariable("PAGE_FORM_ACTION", $this->page_form_action);
905  $this->parseCurrentBlock();
906  $this->touchBlock("page_form_end");
907  }
908  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $part=self::DEFAULT_BLOCK)
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillPermanentLink()

ilGlobalTemplate::fillPermanentLink ( )
protected

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

References setVariable().

Referenced by getSpecial(), and renderPage().

1131  : void
1132  {
1133  if (!empty($this->permanent_link)) {
1134  $plinkgui = new ilPermanentLinkGUI(
1135  $this->permanent_link["type"],
1136  $this->permanent_link["id"],
1137  $this->permanent_link["append"],
1138  $this->permanent_link["target"]
1139  );
1140  if ($this->permanent_link["title"] !== "") {
1141  $plinkgui->setTitle($this->permanent_link["title"]);
1142  }
1143  $this->setVariable("PRMLINK", $plinkgui->getHTML());
1144  }
1145  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRightContent()

ilGlobalTemplate::fillRightContent ( )
protected
Exceptions
ilTemplateException

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

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

Referenced by getSpecial(), and renderPage().

831  : void
832  {
833  if (trim($this->right_content) !== "") {
834  $this->setCurrentBlock("right_column");
835  $this->setVariable("RIGHT_CONTENT", trim($this->right_content));
836  $this->parseCurrentBlock();
837  }
838  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $part=self::DEFAULT_BLOCK)
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillScreenReaderFocus()

ilGlobalTemplate::fillScreenReaderFocus ( )

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

Referenced by getSpecial(), and renderPage().

1027  : void
1028  {
1029  // abandoned
1030  }
+ Here is the caller graph for this function:

◆ fillSideIcons()

ilGlobalTemplate::fillSideIcons ( )
protected
Exceptions
ilTemplateException

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

References $DIC, $ilSetting, $lng, ilFrameTargetInfo\_getFrame(), ilUtil\getImagePath(), parseCurrentBlock(), setCurrentBlock(), setVariable(), and touchBlock().

Referenced by getSpecial(), and renderPage().

1035  : void
1036  {
1037  global $DIC;
1038 
1039  $ilSetting = $DIC->settings();
1040  $lng = $DIC->language();
1041 
1042  if ($this->tree_flat_link !== "") {
1043  if ($this->left_nav_content !== "") {
1044  $this->touchBlock("tree_lns");
1045  }
1046 
1047  $this->setCurrentBlock("tree_mode");
1048  $this->setVariable("LINK_MODE", $this->tree_flat_link);
1049  $this->setVariable("IMG_TREE", ilUtil::getImagePath("standard/icon_sidebar_on.svg"));
1050  if ($ilSetting->get("tree_frame") === "right") {
1051  $this->setVariable("RIGHT", "Right");
1052  }
1053  $this->setVariable("ALT_TREE", $lng->txt($this->tree_flat_mode . "view"));
1054  $this->setVariable("TARGET_TREE", ilFrameTargetInfo::_getFrame("MainContent"));
1055  $this->parseCurrentBlock();
1056  }
1057 
1058  $this->setCurrentBlock("tree_icons");
1059  $this->parseCurrentBlock();
1060  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
parseCurrentBlock(string $part=self::DEFAULT_BLOCK)
global $DIC
Definition: feed.php:28
$lng
global $ilSetting
Definition: privfeed.php:18
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
static _getFrame(string $a_class)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillTabs()

ilGlobalTemplate::fillTabs ( )
Exceptions
ilTemplateException

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

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

Referenced by getSpecial(), and renderPage().

702  : void
703  {
704  if ($this->blockExists("tabs_outer_start")) {
705  $this->touchBlock("tabs_outer_start");
706  $this->touchBlock("tabs_outer_end");
707  $this->touchBlock("tabs_inner_start");
708  $this->touchBlock("tabs_inner_end");
709 
710  if ($this->tabs_html !== "") {
711  $this->setVariable("TABS", $this->tabs_html);
712  }
713  $this->setVariable("SUB_TABS", $this->sub_tabs_html);
714  }
715  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
blockExists(string $a_blockname)
check if block exists in actual template
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillToolbar()

ilGlobalTemplate::fillToolbar ( )
protected
Exceptions
ilTemplateException

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

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

Referenced by getSpecial(), and renderPage().

843  : void
844  {
845  global $DIC;
846 
847  $ilToolbar = $DIC["ilToolbar"];
848  $thtml = $ilToolbar->getHTML();
849 
850  if ($thtml !== "") {
851  $this->setCurrentBlock("toolbar_buttons");
852  $this->setVariable("BUTTONS", $thtml);
853  $this->parseCurrentBlock();
854  }
855  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $part=self::DEFAULT_BLOCK)
global $DIC
Definition: feed.php:28
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillWindowTitle()

ilGlobalTemplate::fillWindowTitle ( )

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

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

Referenced by getSpecial(), and renderPage().

868  : void
869  {
870  global $DIC;
871 
872  $ilSetting = $DIC->settings();
873 
874  if ($this->header_page_title !== "") {
875  $title = ilUtil::stripScriptHTML($this->header_page_title);
876  $this->setVariable("PAGETITLE", "- " . $title);
877  }
878 
879  if ($ilSetting->get('short_inst_name') !== "") {
880  $this->setVariable(
881  "WINDOW_TITLE",
882  $ilSetting->get('short_inst_name')
883  );
884  } else {
885  $this->setVariable(
886  "WINDOW_TITLE",
887  "ILIAS"
888  );
889  }
890  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
static stripScriptHTML(string $a_str, string $a_allow="", bool $a_rm_js=true)
global $DIC
Definition: feed.php:28
global $ilSetting
Definition: privfeed.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get()

ilGlobalTemplate::get ( string  $part = self::DEFAULT_BLOCK)
Exceptions
ilTemplateException

Implements ilGlobalTemplateInterface.

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

1169  : string
1170  {
1171  return $this->template->get($part);
1172  }

◆ getCSSFiles()

ilGlobalTemplate::getCSSFiles ( )

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

References $css_files.

1226  : array
1227  {
1228  return $this->css_files;
1229  }

◆ getHeaderActionMenu()

ilGlobalTemplate::getHeaderActionMenu ( )
protected

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

References $header_action.

Referenced by fillHeader().

655  : string
656  {
657  return $this->header_action;
658  }
+ Here is the caller graph for this function:

◆ getJSFiles()

ilGlobalTemplate::getJSFiles ( )

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

References $js_files_batch.

1221  : array
1222  {
1223  return $this->js_files_batch;
1224  }

◆ getLoginTargetPar()

ilGlobalTemplate::getLoginTargetPar ( )
protected

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

References $login_target_par.

919  : string
920  {
922  }

◆ getMainMenu()

ilGlobalTemplate::getMainMenu ( )
protected

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

Referenced by getSpecial(), and renderPage().

140  : void
141  {
142  }
+ Here is the caller graph for this function:

◆ getMessageTextForType()

ilGlobalTemplate::getMessageTextForType ( string  $type)
protected

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

References ilSession\get(), and ilSession\has().

Referenced by fillMessage().

185  : ?string
186  {
187  if (ilSession::has($type)) {
188  return (string) ilSession::get($type);
189  }
190 
191  return $this->messages[$type] ?? null;
192  }
static get(string $a_var)
static has($a_var)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOnLoadCodeForAsynch()

ilGlobalTemplate::getOnLoadCodeForAsynch ( )

Get js onload code for ajax calls.

Implements ilGlobalTemplateInterface.

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

228  : string
229  {
230  $js = "";
231  for ($i = 1; $i <= 3; $i++) {
232  if (isset($this->on_load_code[$i])) {
233  foreach ($this->on_load_code[$i] as $code) {
234  $js .= $code . "\n";
235  }
236  }
237  }
238  if ($js) {
239  return '<script type="text/javascript">' . "\n" .
240  $js .
241  '</script>' . "\n";
242  }
243 
244  return '';
245  }

◆ getSpecial()

ilGlobalTemplate::getSpecial ( string  $part = self::DEFAULT_BLOCK,
bool  $add_error_mess = false,
bool  $handle_referer = false,
bool  $add_ilias_footer = false,
bool  $add_standard_elements = false,
bool  $a_main_menu = true,
bool  $a_tabs = true 
)
Exceptions
ilTemplateException
ilCtrlException

Implements ilGlobalTemplateInterface.

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

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

936  : string {
937  if ($add_error_mess) {
938  $this->fillMessage();
939  }
940 
941  // set standard parts (tabs and title icon)
942  if ($add_standard_elements) {
943  if ($a_tabs && $this->blockExists("content")) {
944  // determine default screen id
945  $this->getTabsHTML();
946  }
947 
948  // to get also the js files for the main menu
949  $this->getMainMenu();
950  $this->initHelp();
951 
952  // these fill blocks in tpl.main.html
953  $this->fillCssFiles();
954  $this->fillInlineCss();
955  $this->fillBodyClass();
956 
957  // these fill just plain placeholder variables in tpl.main.html
958  $this->setCurrentBlock();
959  $this->fillNewContentStyle();
960  $this->fillContentLanguage();
961  $this->fillWindowTitle();
962 
963  // these fill blocks in tpl.adm_content.html
964  $this->fillHeader();
965  $this->fillSideIcons();
966  $this->fillScreenReaderFocus();
967  $this->fillLeftContent();
968  $this->fillLeftNav();
969  $this->fillRightContent();
970  $this->fillAdminPanel();
971  $this->fillToolbar();
972  $this->fillPermanentLink();
973 
974  $this->setCenterColumnClass();
975 
976  // late loading of javascipr files, since operations above may add files
977  $this->fillJavaScriptFiles();
978  $this->fillOnLoadCode();
979 
980  // these fill just plain placeholder variables in tpl.adm_content.html
981  if ($this->blockExists("content")) {
982  $this->setCurrentBlock("content");
983  if ($a_tabs) {
984  $this->fillTabs();
985  }
986  $this->fillMainContent();
987  if ($a_main_menu) {
988  $this->fillMainMenu();
989  }
990  $this->parseCurrentBlock();
991  }
992  }
993 
994  if ($part === self::DEFAULT_BLOCK) {
995  $html = $this->template->get();
996  } else {
997  $html = $this->template->get($part);
998  }
999 
1000  // save language usages as late as possible
1002 
1003  return $html;
1004  }
parseCurrentBlock(string $part=self::DEFAULT_BLOCK)
blockExists(string $a_blockname)
check if block exists in actual template
fillJavaScriptFiles(bool $a_force=false)
Probably adds javascript files.
fillCssFiles(bool $a_force=false)
static _saveUsages()
Store the collected language variable usages in the user session This should be called as late as pos...
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
+ Here is the call graph for this function:

◆ getTabsHTML()

ilGlobalTemplate::getTabsHTML ( )
protected

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

References $DIC, and blockExists().

Referenced by getSpecial(), and renderPage().

717  : void
718  {
719  global $DIC;
720 
721  $ilTabs = $DIC["ilTabs"];
722 
723  if ($this->blockExists("tabs_outer_start")) {
724  $this->sub_tabs_html = $ilTabs->getSubTabHTML();
725  $this->tabs_html = $ilTabs->getHTML(true);
726  }
727  }
global $DIC
Definition: feed.php:28
blockExists(string $a_blockname)
check if block exists in actual template
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hideFooter()

ilGlobalTemplate::hideFooter ( )

Make the template hide the footer.

Implements ilGlobalTemplateInterface.

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

135  : void
136  {
137  $this->show_footer = false;
138  }

◆ initHelp()

ilGlobalTemplate::initHelp ( )
protected

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

Referenced by getSpecial(), and renderPage().

148  : void
149  {
150  //ilHelpGUI::initHelp($this);
151  }
+ 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.

Exceptions
ilTemplateException

Implements ilGlobalTemplateInterface.

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

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

518  : void
519  {
520  if ($this->standard_template_loaded) {
521  return;
522  }
523 
524  // always load jQuery
527 
528  // always load ui framework
530 
531  $this->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
532  $this->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
533 
534  $this->standard_template_loaded = true;
535  }
addBlockFile(string $var, string $block, string $template_name, string $in_module=null)
static initjQueryUI(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components.txt for included components)
static init(ilGlobalTemplateInterface $template=null)
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
+ Here is the call graph for this function:

◆ parseCurrentBlock()

ilGlobalTemplate::parseCurrentBlock ( string  $part = self::DEFAULT_BLOCK)

◆ printToStdout()

ilGlobalTemplate::printToStdout ( string  $part = self::DEFAULT_BLOCK,
bool  $has_tabs = true,
bool  $skip_main_menu = false 
)
Parameters
bool$has_tabsif template variable {TABS} should be filled with content of ilTabs
bool$skip_main_menuif the main menu should be rendered.

Implements ilGlobalTemplateInterface.

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

References $DIC, ILIAS\UI\examples\Symbol\Glyph\Header\header(), ilYuiUtil\initDom(), and renderPage().

1010  : void {
1011  global $DIC;
1012 
1013  // include yahoo dom per default
1015 
1016  header('P3P: CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"');
1017  header("Content-type: text/html; charset=UTF-8");
1018 
1019  print $this->renderPage(
1020  $part,
1021  $a_fill_tabs,
1022  $a_skip_main_menu,
1023  $DIC
1024  );
1025  }
global $DIC
Definition: feed.php:28
static initDom(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Dom.
renderPage(string $part, bool $a_fill_tabs, bool $a_skip_main_menu, Container $DIC)
+ Here is the call graph for this function:

◆ printToString()

ilGlobalTemplate::printToString ( string  $part = self::DEFAULT_BLOCK)

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

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

128  : string
129  {
130  global $DIC;
132  return $this->renderPage($part, true, false, $DIC);
133  }
global $DIC
Definition: feed.php:28
static initDom(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Dom.
renderPage(string $part, bool $a_fill_tabs, bool $a_skip_main_menu, Container $DIC)
+ Here is the call graph for this function:

◆ renderPage()

ilGlobalTemplate::renderPage ( string  $part,
bool  $a_fill_tabs,
bool  $a_skip_main_menu,
Container  $DIC 
)
Exceptions
ilTemplateException
ilCtrlException

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

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

Referenced by printToStdout(), and printToString().

385  : string {
386  $this->fillMessage();
387 
388  // set standard parts (tabs and title icon)
389  $this->fillBodyClass();
390 
391  // see #22992
392  $this->fillContentLanguage();
393 
394  if ($a_fill_tabs) {
395  if ($this->blockExists("content")) {
396  // determine default screen id
397  $this->getTabsHTML();
398  }
399  // to get also the js files for the main menu
400  if (!$a_skip_main_menu) {
401  $this->getMainMenu();
402  $this->initHelp();
403  }
404 
405  // these fill blocks in tpl.main.html
406  $this->fillCssFiles();
407  $this->fillInlineCss();
408  //$this->fillJavaScriptFiles();
409 
410  // these fill just plain placeholder variables in tpl.main.html
411  $this->setCurrentBlock();
412  $this->fillNewContentStyle();
413  $this->fillWindowTitle();
414 
415  // these fill blocks in tpl.adm_content.html
416  $this->fillHeader();
417  $this->fillSideIcons();
418  $this->fillScreenReaderFocus();
419  $this->fillLeftContent();
420  $this->fillLeftNav();
421  $this->fillRightContent();
422  $this->fillAdminPanel();
423  $this->fillToolbar();
424  $this->fillPermanentLink();
425 
426  $this->setCenterColumnClass();
427 
428  // late loading of javascipr files, since operations above may add files
429  $this->fillJavaScriptFiles();
430  $this->fillOnLoadCode();
431 
432  // these fill just plain placeholder variables in tpl.adm_content.html
433  if ($this->blockExists("content")) {
434  $this->setCurrentBlock("content");
435  $this->fillTabs();
436  $this->fillMainContent();
437  $this->fillMainMenu();
438  $this->parseCurrentBlock();
439  }
440  }
441 
442  if ($part === self::DEFAULT_BLOCK) {
443  $html = $this->template->getUnmodified();
444  } else {
445  $html = $this->template->getUnmodified($part);
446  }
447 
448  // Modification of html is done inline here and can't be done
449  // by ilTemplate, because the "phase" is template_show in this
450  // case here.
451  $component_factory = $DIC["component.factory"];
452 
453  // not quite sure if that's good.
454  $id = $this->template->getTemplateIdentifier(
455  $this->template_name,
456  $this->in_module
457  );
458 
459  foreach ($component_factory->getActivePluginsInSlot("uihk") as $ui_plugin) {
460  $gui_class = $ui_plugin->getUIClassInstance();
461  $resp = $gui_class->getHTML(
462  "",
463  "template_show",
464  [
465  "tpl_id" => $id,
466  "tpl_obj" => $this,
467  "html" => $html
468  ]
469  );
470 
471  if ($resp["mode"] !== ilUIHookPluginGUI::KEEP) {
472  $html = $gui_class->modifyHTML($html, $resp);
473  }
474  }
475 
476  // save language usages as late as possible
478 
479  return $html;
480  }
parseCurrentBlock(string $part=self::DEFAULT_BLOCK)
blockExists(string $a_blockname)
check if block exists in actual template
fillJavaScriptFiles(bool $a_force=false)
Probably adds javascript files.
fillCssFiles(bool $a_force=false)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static _saveUsages()
Store the collected language variable usages in the user session This should be called as late as pos...
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetCss()

ilGlobalTemplate::resetCss ( )
protected

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

482  : void
483  {
484  $this->css_files = [];
485  }

◆ resetHeaderBlock()

ilGlobalTemplate::resetHeaderBlock ( bool  $a_reset_header_action = true)

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

Implements ilGlobalTemplateInterface.

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

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

1147  : void
1148  {
1149  $this->setTitle('');
1150  $this->setTitleIcon('');
1151  $this->setDescription('');
1152  $this->setAlertProperties([]);
1153  $this->enable_fileupload = null;
1154 
1155  // see setFullscreenHeader()
1156  if ($a_reset_header_action) {
1157  $this->setHeaderActionMenu('');
1158  }
1159  }
setAlertProperties(array $a_props)
Set alert properties.
setDescription(string $a_descr)
Sets descripton below title in standard template.
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
setHeaderActionMenu(string $a_header)
Set header action menu.
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
+ Here is the call graph for this function:

◆ resetJavascript()

ilGlobalTemplate::resetJavascript ( )

Reset javascript files.

Implements ilGlobalTemplateInterface.

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

247  : void
248  {
249  $this->js_files = [];
250  $this->js_files_vp = [];
251  $this->js_files_batch = [];
252  }

◆ setAlertProperties()

ilGlobalTemplate::setAlertProperties ( array  $alerts)

Set alert properties.

Parameters
array<int,array>$alerts

Implements ilGlobalTemplateInterface.

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

Referenced by clearHeader(), and resetHeaderBlock().

564  : void
565  {
566  $this->title_alerts = $a_props;
567  }
+ Here is the caller graph for this function:

◆ setBodyClass()

ilGlobalTemplate::setBodyClass ( string  $a_class = "")

Sets the body-tags class.

Implements ilGlobalTemplateInterface.

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

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

359  : void
360  {
361  $this->body_class = $a_class;
362  }
+ Here is the caller graph for this function:

◆ setCenterColumnClass()

ilGlobalTemplate::setCenterColumnClass ( )
protected
Exceptions
ilTemplateException

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

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

Referenced by getSpecial(), and renderPage().

773  : void
774  {
775  if (!$this->blockExists("center_col_width")) {
776  return;
777  }
778 
779  $left = trim($this->left_content);
780  $right = trim($this->right_content);
781 
782  switch (true) {
783  case ('' !== $left && '' !== $right):
784  $center_column_class = 'col-sm-6';
785  break;
786 
787  case ('' !== $left || '' !== $right):
788  $center_column_class = 'col-sm-9';
789  break;
790 
791  default:
792  $center_column_class = "col-sm-12";
793  break;
794  }
795 
796  if ('' !== $left) {
797  $center_column_class .= " col-sm-push-3";
798  }
799 
800  $this->setCurrentBlock("center_col_width");
801  $this->setVariable("CENTER_COL", $center_column_class);
802  $this->parseCurrentBlock();
803  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $part=self::DEFAULT_BLOCK)
blockExists(string $a_blockname)
check if block exists in actual template
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setContent()

ilGlobalTemplate::setContent ( string  $a_html)

Sets content for standard template.

Implements ilGlobalTemplateInterface.

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

729  : void
730  {
731  if ($a_html !== "") {
732  $this->main_content = $a_html;
733  }
734  }

◆ setCurrentBlock()

ilGlobalTemplate::setCurrentBlock ( string  $part = self::DEFAULT_BLOCK)

◆ setDescription()

ilGlobalTemplate::setDescription ( string  $a_descr)

Sets descripton below title in standard template.

Implements ilGlobalTemplateInterface.

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

Referenced by clearHeader(), and resetHeaderBlock().

550  : void
551  {
552  $this->title_desc = $a_descr;
553  }
+ Here is the caller graph for this function:

◆ setFileUploadRefId()

ilGlobalTemplate::setFileUploadRefId ( int  $a_ref_id)

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

Implements ilGlobalTemplateInterface.

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

1161  : void
1162  {
1163  $this->enable_fileupload = $a_ref_id;
1164  }

◆ setHeaderActionMenu()

ilGlobalTemplate::setHeaderActionMenu ( string  $a_header)

Set header action menu.

Implements ilGlobalTemplateInterface.

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

Referenced by resetHeaderBlock().

577  : void
578  {
579  $this->header_action = $a_header;
580  }
+ Here is the caller graph for this function:

◆ setHeaderPageTitle()

ilGlobalTemplate::setHeaderPageTitle ( string  $a_title)

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

Implements ilGlobalTemplateInterface.

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

582  : void
583  {
584  $this->header_page_title = $a_title;
585  }

◆ setLeftContent()

ilGlobalTemplate::setLeftContent ( string  $a_html)

Sets content of left column.

Implements ilGlobalTemplateInterface.

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

736  : void
737  {
738  if ($a_html !== "") {
739  $this->left_content = $a_html;
740  }
741  }

◆ setLeftNavContent()

ilGlobalTemplate::setLeftNavContent ( string  $a_content)

Sets content of left navigation column.

Implements ilGlobalTemplateInterface.

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

743  : void
744  {
745  if ($a_content !== "") {
746  $this->left_nav_content = $a_content;
747  }
748  }

◆ setLocator()

ilGlobalTemplate::setLocator ( )

Insert locator.

Implements ilGlobalTemplateInterface.

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

References $DIC, and setVariable().

660  : void
661  {
662  global $DIC;
663 
664  $ilLocator = $DIC["ilLocator"];
665  $html = "";
666 
667  $uip = new ilUIHookProcessor(
668  "Services/Locator",
669  "main_locator",
670  ["locator_gui" => $ilLocator]
671  );
672  if (!$uip->replaced()) {
673  $html = $ilLocator->getHTML();
674  }
675  $html = $uip->getHTML($html);
676 
677  $this->setVariable("LOCATOR", $html);
678  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

◆ setLoginTargetPar()

ilGlobalTemplate::setLoginTargetPar ( string  $a_val)

Set target parameter for login (public sector).

This is used by the main menu

Implements ilGlobalTemplateInterface.

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

914  : void
915  {
916  $this->login_target_par = $a_val;
917  }

◆ setOnScreenMessage()

ilGlobalTemplate::setOnScreenMessage ( string  $type,
string  $a_txt,
bool  $a_keep = false 
)

Set a message to be displayed to the user.

Please use instead of ilUtil::sendInfo(), ilUtil::sendSuccess() and ilUtil::sendFailure().

Implements ilGlobalTemplateInterface.

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

References ilSession\set().

153  : void
154  {
155  if ($a_txt === "" ||
156  !in_array($a_type, self::MESSAGE_TYPES, true)
157  ) {
158  return;
159  }
160 
161  if (!$a_keep) {
162  $this->messages[$a_type] = $a_txt;
163  } else {
164  ilSession::set($a_type, $a_txt);
165  }
166  }
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ setPageFormAction()

ilGlobalTemplate::setPageFormAction ( string  $a_action)

Sets the pages form action.

Implements ilGlobalTemplateInterface.

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

892  : void
893  {
894  $this->page_form_action = $a_action;
895  }

◆ setPermanentLink()

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

Generates and sets a permanent ilias link.

Implements ilGlobalTemplateInterface.

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

1121  : void {
1122  $this->permanent_link = [
1123  "type" => $a_type,
1124  "id" => $a_id,
1125  "append" => $a_append,
1126  "target" => $a_target,
1127  "title" => $a_title
1128  ];
1129  }

◆ setRightContent()

ilGlobalTemplate::setRightContent ( string  $a_html)

Sets content of right column.

Implements ilGlobalTemplateInterface.

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

763  : void
764  {
765  if ($a_html !== '') {
766  $this->right_content = $a_html;
767  }
768  }

◆ setSubTabs()

ilGlobalTemplate::setSubTabs ( string  $a_tabs_html)

sets subtabs in standard template

Implements ilGlobalTemplateInterface.

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

References setVariable().

694  : void
695  {
696  $this->setVariable("SUB_TABS", $a_tabs_html);
697  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
+ Here is the call graph for this function:

◆ setTabs()

ilGlobalTemplate::setTabs ( string  $a_tabs_html)
Exceptions
ilTemplateException

Implements ilGlobalTemplateInterface.

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

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

683  : void
684  {
685  if ($a_tabs_html !== "" && $this->blockExists("tabs_outer_start")) {
686  $this->touchBlock("tabs_outer_start");
687  $this->touchBlock("tabs_outer_end");
688  $this->touchBlock("tabs_inner_start");
689  $this->touchBlock("tabs_inner_end");
690  $this->setVariable("TABS", $a_tabs_html);
691  }
692  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
blockExists(string $a_blockname)
check if block exists in actual template
+ Here is the call graph for this function:

◆ setTitle()

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

Sets title in standard template.

Will override the header_page_title.

Implements ilGlobalTemplateInterface.

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

Referenced by clearHeader(), and resetHeaderBlock().

541  : void
542  {
543  $this->title = $a_title;
544  $this->header_page_title = $a_title;
545  }
+ Here is the caller graph for this function:

◆ setTitleIcon()

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

set title icon

Implements ilGlobalTemplateInterface.

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

Referenced by clearHeader(), and resetHeaderBlock().

558  : void
559  {
560  $this->icon_desc = $a_icon_desc;
561  $this->icon_path = $a_icon_path;
562  }
+ Here is the caller graph for this function:

◆ setTreeFlatIcon()

ilGlobalTemplate::setTreeFlatIcon ( string  $a_link,
string  $a_mode 
)

Sets a tree or flat icon.

Parameters
string$a_mode("tree" | "flat")

Implements ilGlobalTemplateInterface.

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

1062  : void
1063  {
1064  $this->tree_flat_link = $a_link;
1065  $this->tree_flat_mode = $a_mode;
1066  }

◆ setVariable()

ilGlobalTemplate::setVariable ( string  $variable,
  $value = '' 
)

◆ touchBlock()

ilGlobalTemplate::touchBlock ( string  $block)
Exceptions
ilTemplateException

Implements ilGlobalTemplateInterface.

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

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

1195  : bool
1196  {
1197  return $this->template->touchBlock($block);
1198  }
+ Here is the caller graph for this function:

◆ variableExists()

ilGlobalTemplate::variableExists ( string  $a_variablename)
protected

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

1179  : bool
1180  {
1181  return $this->template->variableExists($a_variablename);
1182  }

Field Documentation

◆ $admin_panel_arrow

bool ilGlobalTemplate::$admin_panel_arrow = false
protected

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

◆ $admin_panel_bottom

bool ilGlobalTemplate::$admin_panel_bottom = false
protected

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

◆ $admin_panel_commands_toolbar

ilToolbarGUI ilGlobalTemplate::$admin_panel_commands_toolbar = null
protected

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

Referenced by fillAdminPanel().

◆ $body_class

string ilGlobalTemplate::$body_class = ''
protected

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

◆ $css_files

array ilGlobalTemplate::$css_files = []
protected

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

Referenced by getCSSFiles().

◆ $enable_fileupload

int ilGlobalTemplate::$enable_fileupload = null
protected

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

◆ $header_action

string ilGlobalTemplate::$header_action = ''
protected

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

Referenced by getHeaderActionMenu().

◆ $header_page_title

string ilGlobalTemplate::$header_page_title = ""
protected

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

◆ $icon_desc

string ilGlobalTemplate::$icon_desc = ''
protected

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

◆ $icon_path

string ilGlobalTemplate::$icon_path = ''
protected

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

◆ $in_module

string ilGlobalTemplate::$in_module
protected

◆ $inline_css

array ilGlobalTemplate::$inline_css = []
protected

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

◆ $js_files

array ilGlobalTemplate::$js_files
protected
Initial value:
= [
"./Services/JavaScript/js/Basic.js",
]

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

◆ $js_files_batch

array ilGlobalTemplate::$js_files_batch
protected
Initial value:
= [
"./Services/JavaScript/js/Basic.js" => 1

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

Referenced by getJSFiles().

◆ $js_files_vp

array ilGlobalTemplate::$js_files_vp
protected
Initial value:
= [
"./Services/JavaScript/js/Basic.js" => true

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

◆ $left_content

string ilGlobalTemplate::$left_content = ''
protected

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

◆ $left_nav_content

string ilGlobalTemplate::$left_nav_content = ''
protected

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

◆ $lightbox

array ilGlobalTemplate::$lightbox = []
protected

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

◆ $login_target_par

string ilGlobalTemplate::$login_target_par = ''
protected

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

Referenced by getLoginTargetPar().

◆ $main_content

string ilGlobalTemplate::$main_content = ""
protected

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

◆ $main_menu

string ilGlobalTemplate::$main_menu = ''
protected

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

◆ $main_menu_spacer

string ilGlobalTemplate::$main_menu_spacer = ''
protected

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

◆ $messages

array ilGlobalTemplate::$messages = []
protected

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

◆ $on_load_code

array ilGlobalTemplate::$on_load_code = []
protected

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

◆ $page_form_action

string ilGlobalTemplate::$page_form_action = ""
protected

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

◆ $permanent_link

array ilGlobalTemplate::$permanent_link = []
protected

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

◆ $right_content

string ilGlobalTemplate::$right_content = ''
protected

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

◆ $show_footer

bool ilGlobalTemplate::$show_footer = true
protected

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

◆ $standard_template_loaded

bool ilGlobalTemplate::$standard_template_loaded = false
protected

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

◆ $sub_tabs_html

string ilGlobalTemplate::$sub_tabs_html = ""
protected

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

◆ $tabs_html

string ilGlobalTemplate::$tabs_html = ""
protected

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

◆ $template

ilTemplate ilGlobalTemplate::$template
protected

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

◆ $template_name

string ilGlobalTemplate::$template_name
protected

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

◆ $title

string ilGlobalTemplate::$title = ""
protected

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

◆ $title_alerts

array ilGlobalTemplate::$title_alerts = []
protected

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

◆ $title_desc

string ilGlobalTemplate::$title_desc = ""
protected

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

◆ $tree_flat_link

string ilGlobalTemplate::$tree_flat_link = ""
protected

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

◆ $tree_flat_mode

string ilGlobalTemplate::$tree_flat_mode = ''
protected

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


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