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

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

+ Inheritance diagram for ilDataCollectionGlobalTemplate:
+ Collaboration diagram for ilDataCollectionGlobalTemplate:

Public Member Functions

 __construct ( $file, $flag1, $flag2, $in_module=false, $vars="DEFAULT", $plugin=false, $a_use_cache=true)
 constructor More...
 
 printToString ()
 
 hideFooter ()
 Make the template hide the footer. More...
 
 setOnScreenMessage ($a_type, $a_txt, $a_keep=false)
 Set a message to be displayed to the user. More...
 
 addJavaScript ($a_js_file, $a_add_version_parameter=true, $a_batch=2)
 Add a javascript file that should be included in the header. More...
 
 addOnLoadCode ($a_code, $a_batch=2)
 Add on load code. More...
 
 getOnLoadCodeForAsynch ()
 Get js onload code for ajax calls. More...
 
 resetJavascript ()
 Reset javascript files. More...
 
 fillJavaScriptFiles ($a_force=false)
 
 addCss ($a_css_file, $media="screen")
 Add a css file that should be included in the header. More...
 
 addInlineCss ($a_css, $media="screen")
 Add a css file that should be included in the header. More...
 
 fillCssFiles ($a_force=false)
 Fill in the css file tags. More...
 
 setBodyClass ($a_class="")
 
 loadStandardTemplate ()
 This loads the standard template "tpl.adm_content.html" and "tpl.statusline.html" the CONTENT and STATUSLINE placeholders if they are not already loaded. More...
 
 setTitle ($a_title, $hidden=false)
 Sets title in standard template. More...
 
 setDescription ($a_descr)
 Sets descripton below title in standard template. More...
 
 setTitleIcon ($a_icon_path, $a_icon_desc="")
 set title icon More...
 
 setAlertProperties (array $a_props)
 Set alert properties. More...
 
 clearHeader ()
 Clear header. More...
 
 setHeaderActionMenu ($a_header)
 Set header action menu. More...
 
 setHeaderPageTitle ($a_title)
 Sets the title of the page (for browser window). More...
 
 setLocator ()
 Insert locator. More...
 
 setTabs ($a_tabs_html)
 sets tabs in standard template More...
 
 setSubTabs ($a_tabs_html)
 sets subtabs in standard template More...
 
 setContent ($a_html)
 Sets content for standard template. More...
 
 setLeftContent ($a_html)
 Sets content of left column. More...
 
 setLeftNavContent ($a_content)
 Sets content of left navigation column. More...
 
 setRightContent ($a_html)
 Sets content of right column. More...
 
 setPageFormAction ($a_action)
 
 setLoginTargetPar ($a_val)
 Set target parameter for login (public sector). More...
 
 getSpecial ( $part="DEFAULT", $add_error_mess=false, $handle_referer=false, $add_ilias_footer=false, $add_standard_elements=false, $a_main_menu=true, $a_tabs=true)
 
 printToStdout ($part="DEFAULT", $a_fill_tabs=true, $a_skip_main_menu=false)
 
 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. More...
 
 addBlockFile ($var, $block, $tplname, $in_module=false)
 overwrites ITX::addBlockFile More...
 
 blockExists ($a_blockname)
 check if block exists in actual template 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
 
 $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)
 
 fillOnLoadCode ()
 Fill add on load code. More...
 
 fillBodyClass ()
 
 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...
 
 fillTabs ()
 
 getTabsHTML ()
 
 fillLeftNav ()
 Fill left navigation frame. More...
 
 setCenterColumnClass ()
 
 fillMainContent ()
 
 fillLeftContent ()
 
 fillRightContent ()
 
 fillToolbar ()
 
 fillContentLanguage ()
 Add current user language to meta tags. More...
 
 fillWindowTitle ()
 
 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...
 
 fillScreenReaderFocus ()
 Accessibility focus for screen readers. 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 14 of file class.ilDataCollectionGlobalTemplate.php.

Constructor & Destructor Documentation

◆ __construct()

ilDataCollectionGlobalTemplate::__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 38 of file class.ilDataCollectionGlobalTemplate.php.

References XapiProxy\$plugin, and setBodyClass().

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

Member Function Documentation

◆ addAdminPanelToolbar()

ilDataCollectionGlobalTemplate::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 1714 of file class.ilDataCollectionGlobalTemplate.php.

1715  {
1716  $this->admin_panel_commands_toolbar = $toolb;
1717  $this->admin_panel_arrow = $a_arrow;
1718  $this->admin_panel_bottom = $a_bottom_panel;
1719  }

◆ addBlockFile()

ilDataCollectionGlobalTemplate::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 1908 of file class.ilDataCollectionGlobalTemplate.php.

Referenced by loadStandardTemplate().

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

◆ addCss()

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

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

Implements ilGlobalTemplateInterface.

Definition at line 607 of file class.ilDataCollectionGlobalTemplate.php.

608  {
609  if (!array_key_exists($a_css_file . $media, $this->css_files)) {
610  $this->css_files[$a_css_file . $media] = array("file" => $a_css_file, "media" => $media);
611  }
612  }

◆ addInlineCss()

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

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

Implements ilGlobalTemplateInterface.

Definition at line 621 of file class.ilDataCollectionGlobalTemplate.php.

622  {
623  $this->inline_css[] = array("css" => $a_css, "media" => $media);
624  }

◆ addJavaScript()

ilDataCollectionGlobalTemplate::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 436 of file class.ilDataCollectionGlobalTemplate.php.

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

◆ addLightbox()

ilDataCollectionGlobalTemplate::addLightbox (   $a_html,
  $a_id 
)

Add lightbox html.

Implements ilGlobalTemplateInterface.

Definition at line 1673 of file class.ilDataCollectionGlobalTemplate.php.

1674  {
1675  $this->lightbox[$a_id] = $a_html;
1676  }

◆ addOnLoadCode()

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

Add on load code.

Implements ilGlobalTemplateInterface.

Definition at line 462 of file class.ilDataCollectionGlobalTemplate.php.

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

◆ blockExists()

ilDataCollectionGlobalTemplate::blockExists (   $a_blockname)

check if block exists in actual template

private

Parameters
stringblockname
Returns
boolean

Implements ilGlobalTemplateInterface.

Definition at line 1923 of file class.ilDataCollectionGlobalTemplate.php.

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

1924  {
1925  return $this->template->blockExists($a_blockname);
1926  }
+ Here is the caller graph for this function:

◆ clearHeader()

ilDataCollectionGlobalTemplate::clearHeader ( )

Clear header.

Implements ilGlobalTemplateInterface.

Definition at line 817 of file class.ilDataCollectionGlobalTemplate.php.

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

818  {
819  $this->setTitle("");
820  $this->setTitleIcon("");
821  $this->setDescription("");
822  $this->setAlertProperties(array());
823  }
setTitleIcon($a_icon_path, $a_icon_desc="")
set title icon
setDescription($a_descr)
Sets descripton below title in standard template.
setTitle($a_title, $hidden=false)
Sets title in standard template.
setAlertProperties(array $a_props)
Set alert properties.
+ Here is the call graph for this function:

◆ enableDragDropFileUpload()

ilDataCollectionGlobalTemplate::enableDragDropFileUpload (   $a_ref_id)

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

Implements ilGlobalTemplateInterface.

Definition at line 1820 of file class.ilDataCollectionGlobalTemplate.php.

Referenced by resetHeaderBlock().

1821  {
1822  $this->enable_fileupload = $a_ref_id;
1823  }
+ Here is the caller graph for this function:

◆ fillAdminPanel()

ilDataCollectionGlobalTemplate::fillAdminPanel ( )
private

Put admin panel into template:

  • creation selector
  • admin view on/off button

Definition at line 1727 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

1728  {
1729  global $DIC;
1730  $lng = $DIC->language();
1731 
1732  if ($this->admin_panel_commands_toolbar === null) {
1733  return;
1734  }
1735 
1737  assert($toolbar instanceof \ilToolbarGUI);
1738 
1739  // Add arrow if desired.
1740  if ($this->admin_panel_arrow) {
1741  $toolb->setLeadingImage(ilUtil::getImagePath("arrow_upright.svg"), $lng->txt("actions"));
1742  }
1743 
1744  $this->fillPageFormAction();
1745 
1746  // Add top admin bar.
1747  $this->setCurrentBlock("adm_view_components");
1748  $this->setVariable("ADM_PANEL1", $toolb->getHTML());
1749  $this->parseCurrentBlock();
1750 
1751  // Add bottom admin bar if user wants one.
1752  if ($this->admin_panel_bottom) {
1753  $this->setCurrentBlock("adm_view_components2");
1754 
1755  // Replace previously set arrow image.
1756  if ($this->admin_panel_arrow) {
1757  $toolb->setLeadingImage(ilUtil::getImagePath("arrow_downright.svg"), $lng->txt("actions"));
1758  }
1759 
1760  $this->setVariable("ADM_PANEL2", $toolb->getHTML());
1761  $this->parseCurrentBlock();
1762  }
1763  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt. ...
$lng
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillBodyClass()

ilDataCollectionGlobalTemplate::fillBodyClass ( )
private

Definition at line 671 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

672  {
673  if ($this->body_class != "" && $this->blockExists("body_class")) {
674  $this->setCurrentBlock("body_class");
675  $this->setVariable("BODY_CLASS", $this->body_class);
676  $this->parseCurrentBlock();
677  }
678  }
blockExists($a_blockname)
check if block exists in actual template
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt. ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillContentLanguage()

ilDataCollectionGlobalTemplate::fillContentLanguage ( )
private

Add current user language to meta tags.

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

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

Referenced by getSpecial(), and printToStdout().

1214  {
1215  global $DIC;
1216  $lng = $DIC->language();
1217 
1218  if (is_object($lng)) {
1219  $this->setVariable('META_CONTENT_LANGUAGE', $lng->getContentLanguage());
1220  $this->setVariable('LANGUAGE_DIRECTION', $lng->getTextDirection());
1221  }
1222  }
$lng
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillCssFiles()

ilDataCollectionGlobalTemplate::fillCssFiles (   $a_force = false)

Fill in the css file tags.

Parameters
boolean$a_force

Definition at line 636 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

637  {
638  if (!$this->blockExists("css_file")) {
639  return;
640  }
641  foreach ($this->css_files as $css) {
642  $filename = $css["file"];
643  if (strpos($filename, "?") > 0) {
644  $filename = substr($filename, 0, strpos($filename, "?"));
645  }
646  if (is_file($filename) || $a_force) {
647  $this->setCurrentBlock("css_file");
648  $this->setVariable("CSS_FILE", $css["file"]);
649  $this->setVariable("CSS_MEDIA", $css["media"]);
650  $this->parseCurrentBlock();
651  }
652  }
653  }
blockExists($a_blockname)
check if block exists in actual template
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt. ...
$filename
Definition: buildRTE.php:89
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillFooter()

ilDataCollectionGlobalTemplate::fillFooter ( )
private

Fill the footer area.

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

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

Referenced by getSpecial(), and printToStdout().

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

◆ fillHeader()

ilDataCollectionGlobalTemplate::fillHeader ( )
private

Fill header.

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

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

Referenced by getSpecial(), and printToStdout().

862  {
863  global $DIC;
864 
865  $lng = $DIC->language();
866 
867  $icon = false;
868  if ($this->icon_path != "") {
869  $icon = true;
870  $this->setCurrentBlock("header_image");
871  if ($this->icon_desc != "") {
872  $this->setVariable("IMAGE_DESC", $lng->txt("icon") . " " . $this->icon_desc);
873  $this->setVariable("IMAGE_ALT", $lng->txt("icon") . " " . $this->icon_desc);
874  }
875 
876  $this->setVariable("IMG_HEADER", $this->icon_path);
877  $this->parseCurrentBlock();
878  $header = true;
879  }
880 
881  if ($this->title != "") {
882  $title = ilUtil::stripScriptHTML($this->title);
883  $this->setVariable("HEADER", $title);
884 
885  $header = true;
886  }
887 
888  if ($header) {
889  $this->setCurrentBlock("header_image");
890  $this->parseCurrentBlock();
891  }
892 
893  if ($this->title_desc != "") {
894  $this->setCurrentBlock("header_desc");
895  $this->setVariable("H_DESCRIPTION", $this->title_desc);
896  $this->parseCurrentBlock();
897  }
898 
899  $header = $this->getHeaderActionMenu();
900  if ($header) {
901  $this->setCurrentBlock("head_action_inner");
902  $this->setVariable("HEAD_ACTION", $header);
903  $this->parseCurrentBlock();
904  $this->touchBlock("head_action");
905  }
906 
907  if (count((array) $this->title_alerts)) {
908  foreach ($this->title_alerts as $alert) {
909  $this->setCurrentBlock('header_alert');
910  if (!($alert['propertyNameVisible'] === false)) {
911  $this->setVariable('H_PROP', $alert['property'] . ':');
912  }
913  $this->setVariable('H_VALUE', $alert['value']);
914  $this->parseCurrentBlock();
915  }
916  }
917 
918  // add file upload drop zone in header
919  if ($this->enable_fileupload != null) {
920  $ref_id = $this->enable_fileupload;
921  $upload_id = "dropzone_" . $ref_id;
922 
923  include_once("./Services/FileUpload/classes/class.ilFileUploadGUI.php");
924  $upload = new ilFileUploadGUI($upload_id, $ref_id, true);
925 
926  $this->setVariable("FILEUPLOAD_DROPZONE_ID", " id=\"$upload_id\"");
927 
928  $this->setCurrentBlock("header_fileupload");
929  $this->setVariable("HEADER_FILEUPLOAD_SCRIPT", $upload->getHTML());
930  $this->parseCurrentBlock();
931  }
932  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt. ...
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
touchBlock($block)
overwrites ITX::touchBlock.
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillInlineCss()

ilDataCollectionGlobalTemplate::fillInlineCss ( )
private

Fill in the inline css.

Parameters
boolean$a_force

Definition at line 695 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

696  {
697  if (!$this->blockExists("css_inline")) {
698  return;
699  }
700  foreach ($this->inline_css as $css) {
701  $this->setCurrentBlock("css_inline");
702  $this->setVariable("CSS_INLINE", $css["css"]);
703  $this->parseCurrentBlock();
704  }
705  }
blockExists($a_blockname)
check if block exists in actual template
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt. ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillJavascriptFile()

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

Definition at line 573 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by fillJavaScriptFiles().

574  {
575  $this->setCurrentBlock("js_file");
576  if ($this->js_files_vp[$file]) {
577  $this->setVariable("JS_FILE", ilUtil::appendUrlParameterString($file, $vers));
578  } else {
579  $this->setVariable("JS_FILE", $file);
580  }
581  $this->parseCurrentBlock();
582  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt. ...
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillJavaScriptFiles()

ilDataCollectionGlobalTemplate::fillJavaScriptFiles (   $a_force = false)

Implements ilGlobalTemplateInterface.

Definition at line 513 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

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

◆ fillLeftContent()

ilDataCollectionGlobalTemplate::fillLeftContent ( )
private

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

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

Referenced by getSpecial(), and printToStdout().

1162  {
1163  if (trim($this->left_content) != "") {
1164  $this->setCurrentBlock("left_column");
1165  $this->setVariable("LEFT_CONTENT", $this->left_content);
1166  $left_col_class = (trim($this->right_content) == "")
1167  ? "col-sm-3 col-sm-pull-9"
1168  : "col-sm-3 col-sm-pull-6";
1169  $this->setVariable("LEFT_COL_CLASS", $left_col_class);
1170  $this->parseCurrentBlock();
1171  }
1172  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt. ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillLeftNav()

ilDataCollectionGlobalTemplate::fillLeftNav ( )
private

Fill left navigation frame.

Definition at line 1098 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

1099  {
1100  if (trim($this->left_nav_content) != "") {
1101  $this->setCurrentBlock("left_nav");
1102  $this->setVariable("LEFT_NAV_CONTENT", $this->left_nav_content);
1103  $this->parseCurrentBlock();
1104  $this->touchBlock("left_nav_space");
1105  }
1106  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt. ...
touchBlock($block)
overwrites ITX::touchBlock.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillLightbox()

ilDataCollectionGlobalTemplate::fillLightbox ( )
private

Fill lightbox content.

Parameters

Definition at line 1686 of file class.ilDataCollectionGlobalTemplate.php.

References setVariable().

Referenced by getSpecial(), and printToStdout().

1687  {
1688  $html = "";
1689 
1690  foreach ($this->lightbox as $lb) {
1691  $html .= $lb;
1692  }
1693  $this->setVariable("LIGHTBOX", $html);
1694  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMainContent()

ilDataCollectionGlobalTemplate::fillMainContent ( )
private

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

References setVariable().

Referenced by getSpecial(), and printToStdout().

1154  {
1155  if (trim($this->main_content) != "") {
1156  $this->setVariable("ADM_CONTENT", $this->main_content);
1157  }
1158  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMainMenu()

ilDataCollectionGlobalTemplate::fillMainMenu ( )
private

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

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

Referenced by getSpecial(), and printToStdout().

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  }
global $DIC
Definition: goto.php:24
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMessage()

ilDataCollectionGlobalTemplate::fillMessage ( )
private

Fill message area.

Definition at line 362 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

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

◆ fillNewContentStyle()

ilDataCollectionGlobalTemplate::fillNewContentStyle ( )
private

Fill Content Style.

Definition at line 711 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

712  {
713  $this->setVariable(
714  "LOCATION_NEWCONTENT_STYLESHEET_TAG",
715  '<link rel="stylesheet" type="text/css" href="' .
717  . '" />'
718  );
719  }
static getNewContentStyleSheetLocation($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()

ilDataCollectionGlobalTemplate::fillOnLoadCode ( )
private

Fill add on load code.

Definition at line 552 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

553  {
554  for ($i = 1; $i <= 3; $i++) {
555  if (is_array($this->on_load_code[$i])) {
556  $this->setCurrentBlock("on_load_code");
557  foreach ($this->on_load_code[$i] as $code) {
558  $this->setCurrentBlock("on_load_code_inner");
559  $this->setVariable("OLCODE", $code);
560  $this->parseCurrentBlock();
561  }
562  $this->setCurrentBlock("on_load_code");
563  $this->parseCurrentBlock();
564  }
565  }
566  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt. ...
$i
Definition: metadata.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillPageFormAction()

ilDataCollectionGlobalTemplate::fillPageFormAction ( )
private

Definition at line 1260 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by fillAdminPanel().

1261  {
1262  if ($this->page_form_action != "") {
1263  $this->setCurrentBlock("page_form_start");
1264  $this->setVariable("PAGE_FORM_ACTION", $this->page_form_action);
1265  $this->parseCurrentBlock();
1266  $this->touchBlock("page_form_end");
1267  }
1268  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt. ...
touchBlock($block)
overwrites ITX::touchBlock.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillPermanentLink()

ilDataCollectionGlobalTemplate::fillPermanentLink ( )
private

Fill in permanent link.

Definition at line 1781 of file class.ilDataCollectionGlobalTemplate.php.

References setVariable().

Referenced by getSpecial(), and printToStdout().

1782  {
1783  if (is_array($this->permanent_link)) {
1784  include_once("./Services/PermanentLink/classes/class.ilPermanentLinkGUI.php");
1785  $plinkgui = new ilPermanentLinkGUI(
1786  $this->permanent_link["type"],
1787  $this->permanent_link["id"],
1788  $this->permanent_link["append"],
1789  $this->permanent_link["target"]
1790  );
1791  if ($this->permanent_link["title"] != "") {
1792  $plinkgui->setTitle($this->permanent_link["title"]);
1793  }
1794  $this->setVariable("PRMLINK", $plinkgui->getHTML());
1795  }
1796  }
Class for permanent links.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRightContent()

ilDataCollectionGlobalTemplate::fillRightContent ( )
private

Definition at line 1175 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

1176  {
1177  if (trim($this->right_content) != "") {
1178  $this->setCurrentBlock("right_column");
1179  $this->setVariable("RIGHT_CONTENT", $this->right_content);
1180  $this->parseCurrentBlock();
1181  }
1182  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt. ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillScreenReaderFocus()

ilDataCollectionGlobalTemplate::fillScreenReaderFocus ( )
private

Accessibility focus for screen readers.

Definition at line 1594 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

1595  {
1596  global $DIC;
1597 
1598  $ilUser = $DIC->user();
1599 
1600  if (is_object($ilUser) && $ilUser->getPref("screen_reader_optimization") && $this->blockExists("sr_focus")) {
1601  $this->touchBlock("sr_focus");
1602  }
1603  }
blockExists($a_blockname)
check if block exists in actual template
touchBlock($block)
overwrites ITX::touchBlock.
global $DIC
Definition: goto.php:24
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillSideIcons()

ilDataCollectionGlobalTemplate::fillSideIcons ( )
private

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

Definition at line 1609 of file class.ilDataCollectionGlobalTemplate.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 printToStdout().

1610  {
1611  global $DIC;
1612 
1613  $ilSetting = $DIC->settings();
1614 
1615  $lng = $DIC->language();
1616 
1617  // tree/flat icon
1618  if ($this->tree_flat_link != "") {
1619  if ($this->left_nav_content != "") {
1620  $this->touchBlock("tree_lns");
1621  }
1622 
1623  $this->setCurrentBlock("tree_mode");
1624  $this->setVariable("LINK_MODE", $this->tree_flat_link);
1625  if ($ilSetting->get("tree_frame") == "right") {
1626  if ($this->tree_flat_mode == "tree") {
1627  $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
1628  $this->setVariable("RIGHT", "Right");
1629  } else {
1630  $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
1631  $this->setVariable("RIGHT", "Right");
1632  }
1633  } else {
1634  if ($this->tree_flat_mode == "tree") {
1635  $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
1636  } else {
1637  $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
1638  }
1639  }
1640  $this->setVariable("ALT_TREE", $lng->txt($this->tree_flat_mode . "view"));
1641  $this->setVariable("TARGET_TREE", ilFrameTargetInfo::_getFrame("MainContent"));
1642  include_once("./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
1643  $this->setVariable(
1644  "TREE_ACC_KEY",
1645  ilAccessKeyGUI::getAttribute(($this->tree_flat_mode == "tree")
1648  );
1649  $this->parseCurrentBlock();
1650  }
1651 
1652  $this->setCurrentBlock("tree_icons");
1653  $this->parseCurrentBlock();
1654  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt. ...
$lng
touchBlock($block)
overwrites ITX::touchBlock.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
global $DIC
Definition: goto.php:24
static _getFrame($a_class, $a_type='')
Get content frame name.
global $ilSetting
Definition: privfeed.php:17
static getAttribute($a_func_id)
Get accesskey HTML attribute.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillTabs()

ilDataCollectionGlobalTemplate::fillTabs ( )
private

Definition at line 1031 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

1032  {
1033  if ($this->blockExists("tabs_outer_start")) {
1034  $this->touchBlock("tabs_outer_start");
1035  $this->touchBlock("tabs_outer_end");
1036  $this->touchBlock("tabs_inner_start");
1037  $this->touchBlock("tabs_inner_end");
1038 
1039  if ($this->tabs_html != "") {
1040  $this->setVariable("TABS", $this->tabs_html);
1041  }
1042  $this->setVariable("SUB_TABS", $this->sub_tabs_html);
1043  }
1044  }
blockExists($a_blockname)
check if block exists in actual template
touchBlock($block)
overwrites ITX::touchBlock.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillToolbar()

ilDataCollectionGlobalTemplate::fillToolbar ( )
private

Definition at line 1191 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

1192  {
1193  global $DIC;
1194 
1195  $ilToolbar = $DIC["ilToolbar"];
1196  ;
1197 
1198  $thtml = $ilToolbar->getHTML();
1199  if ($thtml != "") {
1200  $this->setCurrentBlock("toolbar_buttons");
1201  $this->setVariable("BUTTONS", $thtml);
1202  $this->parseCurrentBlock();
1203  }
1204  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt. ...
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillWindowTitle()

ilDataCollectionGlobalTemplate::fillWindowTitle ( )
private

Definition at line 1225 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

1226  {
1227  global $DIC;
1228 
1229  $ilSetting = $DIC->settings();
1230 
1231  if ($this->header_page_title != "") {
1232  $title = ilUtil::stripScriptHTML($this->header_page_title);
1233  $this->setVariable("PAGETITLE", "- " . $title);
1234  }
1235 
1236  if ($ilSetting->get('short_inst_name') != "") {
1237  $this->setVariable(
1238  "WINDOW_TITLE",
1239  $ilSetting->get('short_inst_name')
1240  );
1241  } else {
1242  $this->setVariable(
1243  "WINDOW_TITLE",
1244  "ILIAS"
1245  );
1246  }
1247  }
static stripScriptHTML($a_str, $a_allow="", $a_rm_js=true)
strip only html tags (4.0) from text $allowed contains tags to be allowed, in format tags a and b ar...
global $DIC
Definition: goto.php:24
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get()

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

Implements ilGlobalTemplateInterface.

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

1836  {
1837  return $this->template->get($part);
1838  }

◆ getHeaderActionMenu()

ilDataCollectionGlobalTemplate::getHeaderActionMenu ( )
private

Get header action menu.

Returns
int ref id

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

References $header_action.

Referenced by fillHeader().

+ Here is the caller graph for this function:

◆ getLoginTargetPar()

ilDataCollectionGlobalTemplate::getLoginTargetPar ( )
private

Get target parameter for login.

Definition at line 1289 of file class.ilDataCollectionGlobalTemplate.php.

Referenced by getMainMenu().

1290  {
1291  return $this->login_target_par;
1292  }
+ Here is the caller graph for this function:

◆ getMainMenu()

ilDataCollectionGlobalTemplate::getMainMenu ( )
private

Definition at line 269 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

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

◆ getMessageTextForType()

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

Definition at line 393 of file class.ilDataCollectionGlobalTemplate.php.

References $_SESSION, and $txt.

Referenced by fillMessage().

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

◆ getOnLoadCodeForAsynch()

ilDataCollectionGlobalTemplate::getOnLoadCodeForAsynch ( )

Get js onload code for ajax calls.

Returns
string

Implements ilGlobalTemplateInterface.

Definition at line 477 of file class.ilDataCollectionGlobalTemplate.php.

References $i.

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

◆ getSpecial()

ilDataCollectionGlobalTemplate::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 1314 of file class.ilDataCollectionGlobalTemplate.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().

1322  {
1323  global $DIC;
1324 
1325  if ($add_error_mess) {
1326  $this->fillMessage();
1327  }
1328 
1329  if ($add_ilias_footer) {
1330  $this->fillFooter();
1331  }
1332 
1333  // set standard parts (tabs and title icon)
1334  if ($add_standard_elements) {
1335  if ($this->blockExists("content") && $a_tabs) {
1336  // determine default screen id
1337  $this->getTabsHTML();
1338  }
1339 
1340  // to get also the js files for the main menu
1341  $this->getMainMenu();
1342  $this->initHelp();
1343 
1344  // these fill blocks in tpl.main.html
1345  $this->fillCssFiles();
1346  $this->fillInlineCss();
1347  $this->fillBodyClass();
1348 
1349  // these fill just plain placeholder variables in tpl.main.html
1350  $this->setCurrentBlock("DEFAULT");
1351  $this->fillNewContentStyle();
1352  $this->fillContentLanguage();
1353  $this->fillWindowTitle();
1354 
1355  // these fill blocks in tpl.adm_content.html
1356  $this->fillHeader();
1357  $this->fillSideIcons();
1358  $this->fillScreenReaderFocus();
1359  $this->fillLeftContent();
1360  $this->fillLeftNav();
1361  $this->fillRightContent();
1362  $this->fillAdminPanel();
1363  $this->fillToolbar();
1364  $this->fillPermanentLink();
1365 
1366  $this->setCenterColumnClass();
1367 
1368  // late loading of javascipr files, since operations above may add files
1369  $this->fillJavaScriptFiles();
1370  $this->fillOnLoadCode();
1371 
1372  // these fill just plain placeholder variables in tpl.adm_content.html
1373  if ($this->blockExists("content")) {
1374  $this->setCurrentBlock("content");
1375  if ($a_tabs) {
1376  $this->fillTabs();
1377  }
1378  $this->fillMainContent();
1379  if ($a_main_menu) {
1380  $this->fillMainMenu();
1381  }
1382  $this->fillLightbox();
1383  $this->parseCurrentBlock();
1384  }
1385  }
1386 
1387  if ($handle_referer) {
1388  $this->handleReferer();
1389  }
1390 
1391  if ($part == "DEFAULT") {
1392  $html = $this->template->get();
1393  } else {
1394  $html = $this->template->get($part);
1395  }
1396 
1397  // save language usages as late as possible
1399 
1400  return $html;
1401  }
fillCssFiles($a_force=false)
Fill in the css file tags.
blockExists($a_blockname)
check if block exists in actual template
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt. ...
fillSideIcons()
Fill side icons (upper icon, tree icon, webfolder icon)
handleReferer()
TODO: this is nice, but shouldn&#39;t be done here (-> maybe at the end of ilias.php!?, alex)
global $DIC
Definition: goto.php:24
fillContentLanguage()
Add current user language to meta tags.
fillScreenReaderFocus()
Accessibility focus for screen readers.
static _saveUsages()
Store the collected language variable usages in the user session This should be called as late as pos...
+ Here is the call graph for this function:

◆ getTabsHTML()

ilDataCollectionGlobalTemplate::getTabsHTML ( )
private

Definition at line 1047 of file class.ilDataCollectionGlobalTemplate.php.

References $DIC, and blockExists().

Referenced by getSpecial(), and printToStdout().

1048  {
1049  global $DIC;
1050 
1051  $ilTabs = $DIC["ilTabs"];
1052 
1053  if ($this->blockExists("tabs_outer_start")) {
1054  $this->sub_tabs_html = $ilTabs->getSubTabHTML();
1055  $this->tabs_html = $ilTabs->getHTML(true);
1056  }
1057  }
blockExists($a_blockname)
check if block exists in actual template
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleReferer()

ilDataCollectionGlobalTemplate::handleReferer ( )
private

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

Definition at line 1533 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

1534  {
1535  if (((substr(strrchr($_SERVER["PHP_SELF"], "/"), 1) != "error.php")
1536  && (substr(strrchr($_SERVER["PHP_SELF"], "/"), 1) != "adm_menu.php")
1537  && (substr(strrchr($_SERVER["PHP_SELF"], "/"), 1) != "chat.php"))
1538  ) {
1539  // referer is modified if query string contains cmd=gateway and $_POST is not empty.
1540  // this is a workaround to display formular again in case of error and if the referer points to another page
1541  $url_parts = @parse_url($_SERVER["REQUEST_URI"]);
1542  if (!$url_parts) {
1543  $protocol = (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://';
1544  $host = $_SERVER['HTTP_HOST'];
1545  $path = $_SERVER['REQUEST_URI'];
1546  $url_parts = @parse_url($protocol . $host . $path);
1547  }
1548 
1549  if (isset($url_parts["query"]) && preg_match("/cmd=gateway/", $url_parts["query"]) && (isset($_POST["cmd"]["create"]))) {
1550  foreach ($_POST as $key => $val) {
1551  if (is_array($val)) {
1552  $val = key($val);
1553  }
1554 
1555  $str .= "&" . $key . "=" . $val;
1556  }
1557 
1558  $_SESSION["referer"] = preg_replace("/cmd=gateway/", substr($str, 1), $_SERVER["REQUEST_URI"]);
1559  $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1560  } else {
1561  if (isset($url_parts["query"]) && preg_match("/cmd=post/", $url_parts["query"]) && (isset($_POST["cmd"]["create"]))) {
1562  foreach ($_POST as $key => $val) {
1563  if (is_array($val)) {
1564  $val = key($val);
1565  }
1566 
1567  $str .= "&" . $key . "=" . $val;
1568  }
1569 
1570  $_SESSION["referer"] = preg_replace("/cmd=post/", substr($str, 1), $_SERVER["REQUEST_URI"]);
1571  if (isset($_GET['ref_id'])) {
1572  $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1573  } else {
1574  $_SESSION['referer_ref_id'] = 0;
1575  }
1576  } else {
1577  $_SESSION["referer"] = $_SERVER["REQUEST_URI"];
1578  if (isset($_GET['ref_id'])) {
1579  $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1580  } else {
1581  $_SESSION['referer_ref_id'] = 0;
1582  }
1583  }
1584  }
1585 
1586  unset($_SESSION["error_post_vars"]);
1587  }
1588  }
$_SESSION["AccountId"]
$_GET["client_id"]
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10
$_POST["username"]
+ Here is the caller graph for this function:

◆ hideFooter()

ilDataCollectionGlobalTemplate::hideFooter ( )

Make the template hide the footer.

Implements ilGlobalTemplateInterface.

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

79  {
80  $this->show_footer = false;
81  }

◆ initHelp()

ilDataCollectionGlobalTemplate::initHelp ( )
private

Init help.

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

Referenced by getSpecial(), and printToStdout().

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

◆ loadStandardTemplate()

ilDataCollectionGlobalTemplate::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 735 of file class.ilDataCollectionGlobalTemplate.php.

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

736  {
737  if ($this->standard_template_loaded) {
738  return;
739  }
740 
741  // always load jQuery
742  include_once("./Services/jQuery/classes/class.iljQueryUtil.php");
745 
746  // always load ui framework
747  include_once("./Services/UICore/classes/class.ilUIFramework.php");
749 
750  $this->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
751  $this->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
752 
753  $this->standard_template_loaded = true;
754  }
addBlockFile($var, $block, $tplname, $in_module=false)
overwrites ITX::addBlockFile
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()

ilDataCollectionGlobalTemplate::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 1890 of file class.ilDataCollectionGlobalTemplate.php.

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

1891  {
1892  return $this->template->parseCurrentBlock($part);
1893  }
+ Here is the caller graph for this function:

◆ printToStdout()

ilDataCollectionGlobalTemplate::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 1409 of file class.ilDataCollectionGlobalTemplate.php.

References $DIC, $http, XapiProxy\$resp, ilObjLanguageAccess\_saveUsages(), blockExists(), exit, 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(), handleReferer(), IL_COMP_SERVICE, ilYuiUtil\initDom(), initHelp(), ilUIHookPluginGUI\KEEP, ILIAS\Filesystem\Stream\Streams\ofString(), parseCurrentBlock(), setCenterColumnClass(), and setCurrentBlock().

1410  {
1411  global $DIC;
1412 
1413  $http = $DIC->http();
1414  switch ($http->request()->getHeaderLine('Accept')) {
1415  case 'application/json':
1416  $string = json_encode([
1417  self::MESSAGE_TYPE_SUCCESS => is_null($this->message[self::MESSAGE_TYPE_FAILURE]),
1418  'message' => '',
1419  ]);
1420  $stream = \ILIAS\Filesystem\Stream\Streams::ofString($string);
1421  $http->saveResponse($http->response()->withBody($stream));
1422  $http->sendResponse();
1423  exit;
1424  default:
1425  // include yahoo dom per default
1426  include_once("./Services/YUI/classes/class.ilYuiUtil.php");
1428 
1429  header('P3P: CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"');
1430  header("Content-type: text/html; charset=UTF-8");
1431 
1432  $this->fillMessage();
1433 
1434  // display ILIAS footer
1435  if ($part !== false) {
1436  $this->fillFooter();
1437  }
1438 
1439  // set standard parts (tabs and title icon)
1440  $this->fillBodyClass();
1441  if ($a_fill_tabs) {
1442  if ($this->blockExists("content")) {
1443  // determine default screen id
1444  $this->getTabsHTML();
1445  }
1446 
1447  // to get also the js files for the main menu
1448  if (!$a_skip_main_menu) {
1449  $this->getMainMenu();
1450  $this->initHelp();
1451  }
1452 
1453  // these fill blocks in tpl.main.html
1454  $this->fillCssFiles();
1455  $this->fillInlineCss();
1456  //$this->fillJavaScriptFiles();
1457 
1458  // these fill just plain placeholder variables in tpl.main.html
1459  $this->setCurrentBlock("DEFAULT");
1460  $this->fillNewContentStyle();
1461  $this->fillContentLanguage();
1462  $this->fillWindowTitle();
1463 
1464  // these fill blocks in tpl.adm_content.html
1465  $this->fillHeader();
1466  $this->fillSideIcons();
1467  $this->fillScreenReaderFocus();
1468  $this->fillLeftContent();
1469  $this->fillLeftNav();
1470  $this->fillRightContent();
1471  $this->fillAdminPanel();
1472  $this->fillToolbar();
1473  $this->fillPermanentLink();
1474 
1475  $this->setCenterColumnClass();
1476 
1477  // late loading of javascipr files, since operations above may add files
1478  $this->fillJavaScriptFiles();
1479  $this->fillOnLoadCode();
1480 
1481  // these fill just plain placeholder variables in tpl.adm_content.html
1482  if ($this->blockExists("content")) {
1483  $this->setCurrentBlock("content");
1484  $this->fillTabs();
1485  $this->fillMainContent();
1486  $this->fillMainMenu();
1487  $this->fillLightbox();
1488  $this->parseCurrentBlock();
1489  }
1490  }
1491 
1492  if ($part == "DEFAULT" or is_bool($part)) {
1493  $html = $this->template->getUnmodified();
1494  } else {
1495  $html = $this->template->getUnmodified($part);
1496  }
1497 
1498  // Modification of html is done inline here and can't be done
1499  // by ilTemplate, because the "phase" is template_show in this
1500  // case here.
1501  $ilPluginAdmin = $DIC["ilPluginAdmin"];
1502  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
1503  foreach ($pl_names as $pl) {
1504  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
1505  $gui_class = $ui_plugin->getUIClassInstance();
1506 
1507  $resp = $gui_class->getHTML(
1508  "",
1509  "template_show",
1510  array("tpl_id" => $this->tplIdentifier, "tpl_obj" => $this, "html" => $html)
1511  );
1512 
1513  if ($resp["mode"] != ilUIHookPluginGUI::KEEP) {
1514  $html = $gui_class->modifyHTML($html, $resp);
1515  }
1516  }
1517 
1518  // save language usages as late as possible
1520 
1521  print $html;
1522 
1523  $this->handleReferer();
1524  break;
1525  }
1526  }
exit
Definition: login.php:29
fillCssFiles($a_force=false)
Fill in the css file tags.
blockExists($a_blockname)
check if block exists in actual template
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt. ...
fillSideIcons()
Fill side icons (upper icon, tree icon, webfolder icon)
static initDom(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Dom.
handleReferer()
TODO: this is nice, but shouldn&#39;t be done here (-> maybe at the end of ilias.php!?, alex)
global $DIC
Definition: goto.php:24
static ofString($string)
Creates a new stream with an initial value.
Definition: Streams.php:25
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
fillContentLanguage()
Add current user language to meta tags.
$http
Definition: raiseError.php:7
fillScreenReaderFocus()
Accessibility focus for screen readers.
static _saveUsages()
Store the collected language variable usages in the user session This should be called as late as pos...
const IL_COMP_SERVICE
+ Here is the call graph for this function:

◆ printToString()

ilDataCollectionGlobalTemplate::printToString ( )

Implements ilGlobalTemplateInterface.

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

54  : string
55  {
56  throw new ilException('not implemented');
57  }

◆ resetCss()

ilDataCollectionGlobalTemplate::resetCss ( )
private

Reset css files.

Definition at line 684 of file class.ilDataCollectionGlobalTemplate.php.

685  {
686  $this->css_files = array();
687  }

◆ resetHeaderBlock()

ilDataCollectionGlobalTemplate::resetHeaderBlock (   $a_reset_header_action = true)

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

Implements ilGlobalTemplateInterface.

Definition at line 1802 of file class.ilDataCollectionGlobalTemplate.php.

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

1803  {
1804  $this->setTitle(null);
1805  $this->setTitleIcon(null);
1806  $this->setDescription(null);
1807  $this->setAlertProperties(array());
1808  $this->enableDragDropFileUpload(null);
1809 
1810  // see setFullscreenHeader()
1811  if ($a_reset_header_action) {
1812  $this->setHeaderActionMenu(null);
1813  }
1814  }
setTitleIcon($a_icon_path, $a_icon_desc="")
set title icon
setHeaderActionMenu($a_header)
Set header action menu.
setDescription($a_descr)
Sets descripton below title in standard template.
setTitle($a_title, $hidden=false)
Sets title in standard template.
enableDragDropFileUpload($a_ref_id)
Enables the file upload into this object by dropping a file.
setAlertProperties(array $a_props)
Set alert properties.
+ Here is the call graph for this function:

◆ resetJavascript()

ilDataCollectionGlobalTemplate::resetJavascript ( )

Reset javascript files.

Implements ilGlobalTemplateInterface.

Definition at line 500 of file class.ilDataCollectionGlobalTemplate.php.

501  {
502  $this->js_files = array();
503  $this->js_files_vp = array();
504  $this->js_files_batch = array();
505  }

◆ setAlertProperties()

ilDataCollectionGlobalTemplate::setAlertProperties ( array  $a_props)

Set alert properties.

Parameters
array$a_props
Returns
void

Implements ilGlobalTemplateInterface.

Definition at line 808 of file class.ilDataCollectionGlobalTemplate.php.

Referenced by clearHeader(), and resetHeaderBlock().

809  {
810  $this->title_alerts = $a_props;
811  }
+ Here is the caller graph for this function:

◆ setBodyClass()

ilDataCollectionGlobalTemplate::setBodyClass (   $a_class = "")

Implements ilGlobalTemplateInterface.

Definition at line 665 of file class.ilDataCollectionGlobalTemplate.php.

Referenced by __construct().

666  {
667  $this->body_class = $a_class;
668  }
+ Here is the caller graph for this function:

◆ setCenterColumnClass()

ilDataCollectionGlobalTemplate::setCenterColumnClass ( )
private

Definition at line 1118 of file class.ilDataCollectionGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

1119  {
1120  if (!$this->blockExists("center_col_width")) {
1121  return;
1122  }
1123  $center_column_class = "";
1124  if (trim($this->right_content) != "" && trim($this->left_content) != "") {
1125  $center_column_class = "two_side_col";
1126  } else {
1127  if (trim($this->right_content) != "" || trim($this->left_content) != "") {
1128  $center_column_class = "one_side_col";
1129  }
1130  }
1131 
1132  switch ($center_column_class) {
1133  case "one_side_col":
1134  $center_column_class = "col-sm-9";
1135  break;
1136  case "two_side_col":
1137  $center_column_class = "col-sm-6";
1138  break;
1139  default:
1140  $center_column_class = "col-sm-12";
1141  break;
1142  }
1143  if (trim($this->left_content) != "") {
1144  $center_column_class .= " col-sm-push-3";
1145  }
1146 
1147  $this->setCurrentBlock("center_col_width");
1148  $this->setVariable("CENTER_COL", $center_column_class);
1149  $this->parseCurrentBlock();
1150  }
blockExists($a_blockname)
check if block exists in actual template
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt. ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setContent()

ilDataCollectionGlobalTemplate::setContent (   $a_html)

Sets content for standard template.

Implements ilGlobalTemplateInterface.

Definition at line 1069 of file class.ilDataCollectionGlobalTemplate.php.

1070  {
1071  if ($a_html != "") {
1072  $this->main_content = $a_html;
1073  }
1074  }

◆ setCurrentBlock()

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

public

Parameters
string
Returns
???

Implements ilGlobalTemplateInterface.

Definition at line 1860 of file class.ilDataCollectionGlobalTemplate.php.

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

1861  {
1862  return $this->template->setCurrentBlock($part);
1863  }
+ Here is the caller graph for this function:

◆ setDescription()

ilDataCollectionGlobalTemplate::setDescription (   $a_descr)

Sets descripton below title in standard template.

Implements ilGlobalTemplateInterface.

Definition at line 785 of file class.ilDataCollectionGlobalTemplate.php.

Referenced by clearHeader(), and resetHeaderBlock().

786  {
787  $this->title_desc = $a_descr;
788  }
+ Here is the caller graph for this function:

◆ setHeaderActionMenu()

ilDataCollectionGlobalTemplate::setHeaderActionMenu (   $a_header)

Set header action menu.

Parameters
string$a_gui$a_header

Implements ilGlobalTemplateInterface.

Definition at line 839 of file class.ilDataCollectionGlobalTemplate.php.

Referenced by resetHeaderBlock().

840  {
841  $this->header_action = $a_header;
842  }
+ Here is the caller graph for this function:

◆ setHeaderPageTitle()

ilDataCollectionGlobalTemplate::setHeaderPageTitle (   $a_title)

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

Implements ilGlobalTemplateInterface.

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

853  {
854  $this->header_page_title = $a_title;
855  }

◆ setLeftContent()

ilDataCollectionGlobalTemplate::setLeftContent (   $a_html)

Sets content of left column.

Implements ilGlobalTemplateInterface.

Definition at line 1080 of file class.ilDataCollectionGlobalTemplate.php.

1081  {
1082  $this->left_content = $a_html;
1083  }

◆ setLeftNavContent()

ilDataCollectionGlobalTemplate::setLeftNavContent (   $a_content)

Sets content of left navigation column.

Implements ilGlobalTemplateInterface.

Definition at line 1089 of file class.ilDataCollectionGlobalTemplate.php.

1090  {
1091  $this->left_nav_content = $a_content;
1092  }

◆ setLocator()

ilDataCollectionGlobalTemplate::setLocator ( )

Insert locator.

Implements ilGlobalTemplateInterface.

Definition at line 955 of file class.ilDataCollectionGlobalTemplate.php.

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

956  {
957  global $DIC;
958 
959  $ilMainMenu = $DIC["ilMainMenu"];
960  $ilLocator = $DIC["ilLocator"];
961 
962  $ilPluginAdmin = $DIC["ilPluginAdmin"];
963 
964  // blog/portfolio
965  if ($ilMainMenu->getMode() == ilMainMenuGUI::MODE_TOPBAR_REDUCED
966  || $ilMainMenu->getMode() == ilMainMenuGUI::MODE_TOPBAR_ONLY
967  ) {
968  $this->setVariable("LOCATOR", "");
969 
970  return;
971  }
972 
973  $html = "";
974  if (is_object($ilPluginAdmin)) {
975  include_once("./Services/UIComponent/classes/class.ilUIHookProcessor.php");
976  $html = $ilLocator->getHTML();
977  $uip = new ilUIHookProcessor(
978  "Services/Locator",
979  "main_locator",
980  array("locator_gui" => $ilLocator, "html" => $html)
981  );
982  $html = $uip->getHTML($html);
983  } else {
984  $html = $ilLocator->getHTML();
985  }
986 
987  $this->setVariable("LOCATOR", $html);
988  }
global $DIC
Definition: goto.php:24
+ Here is the call graph for this function:

◆ setLoginTargetPar()

ilDataCollectionGlobalTemplate::setLoginTargetPar (   $a_val)

Set target parameter for login (public sector).

This is used by the main menu

Implements ilGlobalTemplateInterface.

Definition at line 1280 of file class.ilDataCollectionGlobalTemplate.php.

1281  {
1282  $this->login_target_par = $a_val;
1283  }

◆ setOnScreenMessage()

ilDataCollectionGlobalTemplate::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.ilDataCollectionGlobalTemplate.php.

References $_SESSION.

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

◆ setPageFormAction()

ilDataCollectionGlobalTemplate::setPageFormAction (   $a_action)

Implements ilGlobalTemplateInterface.

Definition at line 1254 of file class.ilDataCollectionGlobalTemplate.php.

1255  {
1256  $this->page_form_action = $a_action;
1257  }

◆ setPermanentLink()

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

Implements ilGlobalTemplateInterface.

Definition at line 1766 of file class.ilDataCollectionGlobalTemplate.php.

1767  {
1768  $this->permanent_link = array(
1769  "type" => $a_type,
1770  "id" => $a_id,
1771  "append" => $a_append,
1772  "target" => $a_target,
1773  "title" => $a_title,
1774  );
1775  }

◆ setRightContent()

ilDataCollectionGlobalTemplate::setRightContent (   $a_html)

Sets content of right column.

Implements ilGlobalTemplateInterface.

Definition at line 1112 of file class.ilDataCollectionGlobalTemplate.php.

1113  {
1114  $this->right_content = $a_html;
1115  }

◆ setSubTabs()

ilDataCollectionGlobalTemplate::setSubTabs (   $a_tabs_html)

sets subtabs in standard template

Implements ilGlobalTemplateInterface.

Definition at line 1025 of file class.ilDataCollectionGlobalTemplate.php.

References setVariable().

1026  {
1027  $this->setVariable("SUB_TABS", $a_tabs_html);
1028  }
+ Here is the call graph for this function:

◆ setTabs()

ilDataCollectionGlobalTemplate::setTabs (   $a_tabs_html)

sets tabs in standard template

Implements ilGlobalTemplateInterface.

Definition at line 1010 of file class.ilDataCollectionGlobalTemplate.php.

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

1011  {
1012  if ($a_tabs_html != "" && $this->blockExists("tabs_outer_start")) {
1013  $this->touchBlock("tabs_outer_start");
1014  $this->touchBlock("tabs_outer_end");
1015  $this->touchBlock("tabs_inner_start");
1016  $this->touchBlock("tabs_inner_end");
1017  $this->setVariable("TABS", $a_tabs_html);
1018  }
1019  }
blockExists($a_blockname)
check if block exists in actual template
touchBlock($block)
overwrites ITX::touchBlock.
+ Here is the call graph for this function:

◆ setTitle()

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

Sets title in standard template.

Will override the header_page_title.

Implements ilGlobalTemplateInterface.

Definition at line 775 of file class.ilDataCollectionGlobalTemplate.php.

Referenced by clearHeader(), and resetHeaderBlock().

776  {
777  $this->title = $a_title;
778  $this->header_page_title = $a_title;
779  }
+ Here is the caller graph for this function:

◆ setTitleIcon()

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

set title icon

Implements ilGlobalTemplateInterface.

Definition at line 794 of file class.ilDataCollectionGlobalTemplate.php.

Referenced by clearHeader(), and resetHeaderBlock().

795  {
796  $this->icon_desc = $a_icon_desc;
797  $this->icon_path = $a_icon_path;
798  }
+ Here is the caller graph for this function:

◆ setTreeFlatIcon()

ilDataCollectionGlobalTemplate::setTreeFlatIcon (   $a_link,
  $a_mode 
)

set tree/flat icon

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

Implements ilGlobalTemplateInterface.

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

1664  {
1665  $this->tree_flat_link = $a_link;
1666  $this->tree_flat_mode = $a_mode;
1667  }

◆ setVariable()

ilDataCollectionGlobalTemplate::setVariable (   $variable,
  $value = '' 
)

◆ touchBlock()

ilDataCollectionGlobalTemplate::touchBlock (   $block)

overwrites ITX::touchBlock.

public

Parameters
string
Returns
???

Implements ilGlobalTemplateInterface.

Definition at line 1875 of file class.ilDataCollectionGlobalTemplate.php.

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

1876  {
1877  return $this->template->touchBlock($block);
1878  }
+ Here is the caller graph for this function:

◆ variableExists()

ilDataCollectionGlobalTemplate::variableExists (   $a_variablename)
private

Definition at line 1847 of file class.ilDataCollectionGlobalTemplate.php.

Referenced by fillMainMenu(), and getMainMenu().

1848  {
1849  return $this->template->variableExists($a_variablename);
1850  }
+ Here is the caller graph for this function:

Field Documentation

◆ $admin_panel_arrow

ilDataCollectionGlobalTemplate::$admin_panel_arrow = null
protected

Definition at line 1704 of file class.ilDataCollectionGlobalTemplate.php.

◆ $admin_panel_bottom

ilDataCollectionGlobalTemplate::$admin_panel_bottom = null
protected

Definition at line 1705 of file class.ilDataCollectionGlobalTemplate.php.

◆ $admin_panel_commands_toolbar

ilDataCollectionGlobalTemplate::$admin_panel_commands_toolbar = null
protected

Definition at line 1703 of file class.ilDataCollectionGlobalTemplate.php.

Referenced by fillAdminPanel().

◆ $css_files

ilDataCollectionGlobalTemplate::$css_files = array()
protected

Definition at line 596 of file class.ilDataCollectionGlobalTemplate.php.

◆ $header_action

ilDataCollectionGlobalTemplate::$header_action
protected

Definition at line 767 of file class.ilDataCollectionGlobalTemplate.php.

Referenced by getHeaderActionMenu().

◆ $header_page_title

ilDataCollectionGlobalTemplate::$header_page_title = ""
protected

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

◆ $inline_css

ilDataCollectionGlobalTemplate::$inline_css = array()
protected

Stores CSS to be included directly.

array

Definition at line 601 of file class.ilDataCollectionGlobalTemplate.php.

◆ $js_files

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

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

◆ $js_files_batch

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

Definition at line 430 of file class.ilDataCollectionGlobalTemplate.php.

◆ $js_files_vp

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

Definition at line 424 of file class.ilDataCollectionGlobalTemplate.php.

◆ $lightbox

ilDataCollectionGlobalTemplate::$lightbox = array()
protected

Definition at line 19 of file class.ilDataCollectionGlobalTemplate.php.

◆ $main_menu

ilDataCollectionGlobalTemplate::$main_menu
protected

Definition at line 262 of file class.ilDataCollectionGlobalTemplate.php.

◆ $main_menu_spacer

ilDataCollectionGlobalTemplate::$main_menu_spacer
protected

Definition at line 266 of file class.ilDataCollectionGlobalTemplate.php.

◆ $message

ilDataCollectionGlobalTemplate::$message = array()
protected

Definition at line 332 of file class.ilDataCollectionGlobalTemplate.php.

◆ $message_types

ilDataCollectionGlobalTemplate::$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.ilDataCollectionGlobalTemplate.php.

◆ $page_form_action

ilDataCollectionGlobalTemplate::$page_form_action = ""
protected

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

◆ $permanent_link

ilDataCollectionGlobalTemplate::$permanent_link = false
protected

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

◆ $show_footer

ilDataCollectionGlobalTemplate::$show_footer = true
private

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

◆ $standard_template_loaded

ilDataCollectionGlobalTemplate::$standard_template_loaded = false
protected

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

◆ $sub_tabs_html

ilDataCollectionGlobalTemplate::$sub_tabs_html = ""
protected

Definition at line 1004 of file class.ilDataCollectionGlobalTemplate.php.

◆ $tabs_html

ilDataCollectionGlobalTemplate::$tabs_html = ""
protected

Definition at line 1000 of file class.ilDataCollectionGlobalTemplate.php.

◆ $template

ilDataCollectionGlobalTemplate::$template
protected

Definition at line 24 of file class.ilDataCollectionGlobalTemplate.php.

◆ $title

ilDataCollectionGlobalTemplate::$title = ""
protected

Definition at line 764 of file class.ilDataCollectionGlobalTemplate.php.

Referenced by fillHeader(), and fillWindowTitle().

◆ $title_alerts

ilDataCollectionGlobalTemplate::$title_alerts = array()
protected

Definition at line 766 of file class.ilDataCollectionGlobalTemplate.php.

◆ $title_desc

ilDataCollectionGlobalTemplate::$title_desc = ""
protected

Definition at line 765 of file class.ilDataCollectionGlobalTemplate.php.

◆ $tree_flat_link

ilDataCollectionGlobalTemplate::$tree_flat_link = ""
protected

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

◆ MESSAGE_TYPE_FAILURE

const ilDataCollectionGlobalTemplate::MESSAGE_TYPE_FAILURE = 'failure'

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

◆ MESSAGE_TYPE_INFO

const ilDataCollectionGlobalTemplate::MESSAGE_TYPE_INFO = "info"

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

◆ MESSAGE_TYPE_QUESTION

const ilDataCollectionGlobalTemplate::MESSAGE_TYPE_QUESTION = "question"

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

◆ MESSAGE_TYPE_SUCCESS

const ilDataCollectionGlobalTemplate::MESSAGE_TYPE_SUCCESS = "success"

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


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