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

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

@access public

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

46 {
47 $this->setBodyClass("std");
48 $this->template = new ilTemplate($file, $flag1, $flag2, $in_module, $vars, $plugin, $a_use_cache);
49 }
special template class to simplify handling of ITX/PEAR

References XapiProxy\$plugin, and setBodyClass().

+ 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 1737 of file class.ilDataCollectionGlobalTemplate.php.

1738 {
1739 $this->admin_panel_commands_toolbar = $toolb;
1740 $this->admin_panel_arrow = $a_arrow;
1741 $this->admin_panel_bottom = $a_bottom_panel;
1742 }

◆ addBlockFile()

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

overwrites ITX::addBlockFile

@access 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 1931 of file class.ilDataCollectionGlobalTemplate.php.

1932 {
1933 return $this->template->addBlockFile($var, $block, $tplname, $in_module);
1934 }

Referenced by loadStandardTemplate().

+ 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 1696 of file class.ilDataCollectionGlobalTemplate.php.

1697 {
1698 $this->lightbox[$a_id] = $a_html;
1699 }

◆ 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

@access private

Parameters
stringblockname
Returns
boolean

Implements ilGlobalTemplateInterface.

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

1947 {
1948 return $this->template->blockExists($a_blockname);
1949 }

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

+ Here is the caller graph for this function:

◆ clearHeader()

ilDataCollectionGlobalTemplate::clearHeader ( )

Clear header.

Implements ilGlobalTemplateInterface.

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

818 {
819 $this->setTitle("");
820 $this->setTitleIcon("");
821 $this->setDescription("");
822 $this->setAlertProperties(array());
823 }
setAlertProperties(array $a_props)
Set alert properties.
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.

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

+ 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 1843 of file class.ilDataCollectionGlobalTemplate.php.

1844 {
1845 $this->enable_fileupload = $a_ref_id;
1846 }

Referenced by resetHeaderBlock().

+ 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 1750 of file class.ilDataCollectionGlobalTemplate.php.

1751 {
1752 global $DIC;
1753 $lng = $DIC->language();
1754
1755 if ($this->admin_panel_commands_toolbar === null) {
1756 return;
1757 }
1758
1760 assert($toolbar instanceof \ilToolbarGUI);
1761
1762 // Add arrow if desired.
1763 if ($this->admin_panel_arrow) {
1764 $toolb->setLeadingImage(ilUtil::getImagePath("arrow_upright.svg"), $lng->txt("actions"));
1765 }
1766
1767 $this->fillPageFormAction();
1768
1769 // Add top admin bar.
1770 $this->setCurrentBlock("adm_view_components");
1771 $this->setVariable("ADM_PANEL1", $toolb->getHTML());
1772 $this->parseCurrentBlock();
1773
1774 // Add bottom admin bar if user wants one.
1775 if ($this->admin_panel_bottom) {
1776 $this->setCurrentBlock("adm_view_components2");
1777
1778 // Replace previously set arrow image.
1779 if ($this->admin_panel_arrow) {
1780 $toolb->setLeadingImage(ilUtil::getImagePath("arrow_downright.svg"), $lng->txt("actions"));
1781 }
1782
1783 $this->setVariable("ADM_PANEL2", $toolb->getHTML());
1784 $this->parseCurrentBlock();
1785 }
1786 }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$lng
$DIC
Definition: xapitoken.php:46

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

Referenced by getSpecial(), and printToStdout().

+ 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.

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

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

Referenced by getSpecial(), and printToStdout().

+ 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 1215 of file class.ilDataCollectionGlobalTemplate.php.

1216 {
1217 global $DIC;
1218
1219 $lng = $DIC->language();
1220 $ilUser = $DIC->user();
1221
1222 $contentLanguage = 'en';
1223 $rtl = array('ar', 'fa', 'ur', 'he');//, 'de'); //make a list of rtl languages
1224 /* rtl-review: add "de" for testing with ltr lang shown in rtl
1225 * and set unicode-bidi to bidi-override for mirror effect */
1226 $textdir = 'ltr';
1227 if (is_object($ilUser)) {
1228 if ($ilUser->getLanguage()) {
1229 $contentLanguage = $ilUser->getLanguage();
1230 } else {
1231 if (is_object($lng)) {
1232 $contentLanguage = $lng->getDefaultLanguage();
1233 }
1234 }
1235 }
1236 $this->setVariable('META_CONTENT_LANGUAGE', $contentLanguage);
1237 if (in_array($contentLanguage, $rtl)) {
1238 $textdir = 'rtl';
1239 }
1240 $this->setVariable('LANGUAGE_DIRECTION', $textdir);
1241
1242 return true;
1243 }
$ilUser
Definition: imgupload.php:18

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

Referenced by getSpecial(), and printToStdout().

+ 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.

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 }
$filename
Definition: buildRTE.php:89

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

Referenced by getSpecial(), and printToStdout().

+ 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.

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");
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 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
$total
Definition: Utf8Test.php:87
$_GET["client_id"]
static isActive()
static _checkTranslate()
Permission check for translations.
static _isPageTranslation()
Check if the current request is a page translation.
static _getTranslationLink()
Get the link to translate the current page.
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
static secureUrl($url)
Prepare secure href attribute.
static validate($a_html, $a_mode)
global $ilBench
Definition: ilias.php:18
global $ilCtrl
Definition: ilias.php:18
global $ilSetting
Definition: privfeed.php:17
$url
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10
global $ilDB

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

Referenced by getSpecial(), and printToStdout().

+ 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.

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 }
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...

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

Referenced by getSpecial(), and printToStdout().

+ 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.

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 }

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

Referenced by getSpecial(), and printToStdout().

+ 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.

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 }

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

Referenced by fillJavaScriptFiles().

+ 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.

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 }
$i
Definition: metadata.php:24

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

Referenced by getSpecial(), and printToStdout().

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

◆ fillLeftContent()

ilDataCollectionGlobalTemplate::fillLeftContent ( )
private

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

1164 {
1165 if (trim($this->left_content) != "") {
1166 $this->setCurrentBlock("left_column");
1167 $this->setVariable("LEFT_CONTENT", $this->left_content);
1168 $left_col_class = (trim($this->right_content) == "")
1169 ? "col-sm-3 col-sm-pull-9"
1170 : "col-sm-3 col-sm-pull-6";
1171 $this->setVariable("LEFT_COL_CLASS", $left_col_class);
1172 $this->parseCurrentBlock();
1173 }
1174 }

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

Referenced by getSpecial(), and printToStdout().

+ 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 1100 of file class.ilDataCollectionGlobalTemplate.php.

1101 {
1102 if (trim($this->left_nav_content) != "") {
1103 $this->setCurrentBlock("left_nav");
1104 $this->setVariable("LEFT_NAV_CONTENT", $this->left_nav_content);
1105 $this->parseCurrentBlock();
1106 $this->touchBlock("left_nav_space");
1107 }
1108 }

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

Referenced by getSpecial(), and printToStdout().

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

◆ fillLightbox()

ilDataCollectionGlobalTemplate::fillLightbox ( )
private

Fill lightbox content.

Parameters

return

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

1710 {
1711 $html = "";
1712
1713 foreach ($this->lightbox as $lb) {
1714 $html .= $lb;
1715 }
1716 $this->setVariable("LIGHTBOX", $html);
1717 }

References setVariable().

Referenced by getSpecial(), and printToStdout().

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

◆ fillMainContent()

ilDataCollectionGlobalTemplate::fillMainContent ( )
private

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

1156 {
1157 if (trim($this->main_content) != "") {
1158 $this->setVariable("ADM_CONTENT", $this->main_content);
1159 }
1160 }

References setVariable().

Referenced by getSpecial(), and printToStdout().

+ 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.

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 }
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl

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

Referenced by getSpecial(), and printToStdout().

+ 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.

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.
$txt
Definition: error.php:13

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

Referenced by getSpecial(), and printToStdout().

+ 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.

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

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

Referenced by getSpecial(), and printToStdout().

+ 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.

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 }

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

Referenced by getSpecial(), and printToStdout().

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

◆ fillPageFormAction()

ilDataCollectionGlobalTemplate::fillPageFormAction ( )
private

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

1282 {
1283 if ($this->page_form_action != "") {
1284 $this->setCurrentBlock("page_form_start");
1285 $this->setVariable("PAGE_FORM_ACTION", $this->page_form_action);
1286 $this->parseCurrentBlock();
1287 $this->touchBlock("page_form_end");
1288 }
1289 }

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

Referenced by fillAdminPanel().

+ 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 1804 of file class.ilDataCollectionGlobalTemplate.php.

1805 {
1806 if (is_array($this->permanent_link)) {
1807 include_once("./Services/PermanentLink/classes/class.ilPermanentLinkGUI.php");
1808 $plinkgui = new ilPermanentLinkGUI(
1809 $this->permanent_link["type"],
1810 $this->permanent_link["id"],
1811 $this->permanent_link["append"],
1812 $this->permanent_link["target"]
1813 );
1814 if ($this->permanent_link["title"] != "") {
1815 $plinkgui->setTitle($this->permanent_link["title"]);
1816 }
1817 $this->setVariable("PRMLINK", $plinkgui->getHTML());
1818 }
1819 }
Class for permanent links.

References setVariable().

Referenced by getSpecial(), and printToStdout().

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

◆ fillRightContent()

ilDataCollectionGlobalTemplate::fillRightContent ( )
private

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

1178 {
1179 if (trim($this->right_content) != "") {
1180 $this->setCurrentBlock("right_column");
1181 $this->setVariable("RIGHT_CONTENT", $this->right_content);
1182 $this->parseCurrentBlock();
1183 }
1184 }

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

Referenced by getSpecial(), and printToStdout().

+ 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 1617 of file class.ilDataCollectionGlobalTemplate.php.

1618 {
1619 global $DIC;
1620
1621 $ilUser = $DIC->user();
1622
1623 if (is_object($ilUser) && $ilUser->getPref("screen_reader_optimization") && $this->blockExists("sr_focus")) {
1624 $this->touchBlock("sr_focus");
1625 }
1626 }

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

Referenced by getSpecial(), and printToStdout().

+ 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 1632 of file class.ilDataCollectionGlobalTemplate.php.

1633 {
1634 global $DIC;
1635
1636 $ilSetting = $DIC->settings();
1637
1638 $lng = $DIC->language();
1639
1640 // tree/flat icon
1641 if ($this->tree_flat_link != "") {
1642 if ($this->left_nav_content != "") {
1643 $this->touchBlock("tree_lns");
1644 }
1645
1646 $this->setCurrentBlock("tree_mode");
1647 $this->setVariable("LINK_MODE", $this->tree_flat_link);
1648 if ($ilSetting->get("tree_frame") == "right") {
1649 if ($this->tree_flat_mode == "tree") {
1650 $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
1651 $this->setVariable("RIGHT", "Right");
1652 } else {
1653 $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
1654 $this->setVariable("RIGHT", "Right");
1655 }
1656 } else {
1657 if ($this->tree_flat_mode == "tree") {
1658 $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
1659 } else {
1660 $this->setVariable("IMG_TREE", ilUtil::getImagePath("icon_sidebar_on.svg"));
1661 }
1662 }
1663 $this->setVariable("ALT_TREE", $lng->txt($this->tree_flat_mode . "view"));
1664 $this->setVariable("TARGET_TREE", ilFrameTargetInfo::_getFrame("MainContent"));
1665 include_once("./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
1666 $this->setVariable(
1667 "TREE_ACC_KEY",
1668 ilAccessKeyGUI::getAttribute(($this->tree_flat_mode == "tree")
1671 );
1672 $this->parseCurrentBlock();
1673 }
1674
1675 $this->setCurrentBlock("tree_icons");
1676 $this->parseCurrentBlock();
1677 }
static getAttribute($a_func_id)
Get accesskey HTML attribute.
static _getFrame($a_class, $a_type='')
Get content frame name.

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().

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

◆ fillTabs()

ilDataCollectionGlobalTemplate::fillTabs ( )
private

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

1034 {
1035 if ($this->blockExists("tabs_outer_start")) {
1036 $this->touchBlock("tabs_outer_start");
1037 $this->touchBlock("tabs_outer_end");
1038 $this->touchBlock("tabs_inner_start");
1039 $this->touchBlock("tabs_inner_end");
1040
1041 if ($this->tabs_html != "") {
1042 $this->setVariable("TABS", $this->tabs_html);
1043 }
1044 $this->setVariable("SUB_TABS", $this->sub_tabs_html);
1045 }
1046 }

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

Referenced by getSpecial(), and printToStdout().

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

◆ fillToolbar()

ilDataCollectionGlobalTemplate::fillToolbar ( )
private

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

1194 {
1195 global $DIC;
1196
1197 $ilToolbar = $DIC["ilToolbar"];
1198 ;
1199
1200 $thtml = $ilToolbar->getHTML();
1201 if ($thtml != "") {
1202 $this->setCurrentBlock("toolbar_buttons");
1203 $this->setVariable("BUTTONS", $thtml);
1204 $this->parseCurrentBlock();
1205 }
1206 }

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

Referenced by getSpecial(), and printToStdout().

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

◆ fillWindowTitle()

ilDataCollectionGlobalTemplate::fillWindowTitle ( )
private

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

1247 {
1248 global $DIC;
1249
1250 $ilSetting = $DIC->settings();
1251
1252 if ($this->header_page_title != "") {
1253 $title = ilUtil::stripScriptHTML($this->header_page_title);
1254 $this->setVariable("PAGETITLE", "- " . $title);
1255 }
1256
1257 if ($ilSetting->get('short_inst_name') != "") {
1258 $this->setVariable(
1259 "WINDOW_TITLE",
1260 $ilSetting->get('short_inst_name')
1261 );
1262 } else {
1263 $this->setVariable(
1264 "WINDOW_TITLE",
1265 "ILIAS"
1266 );
1267 }
1268 }

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

Referenced by getSpecial(), and printToStdout().

+ 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 1858 of file class.ilDataCollectionGlobalTemplate.php.

1859 {
1860 return $this->template->get($part);
1861 }

◆ 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 1310 of file class.ilDataCollectionGlobalTemplate.php.

1311 {
1312 return $this->login_target_par;
1313 }

Referenced by getMainMenu().

+ Here is the caller graph for this function:

◆ getMainMenu()

ilDataCollectionGlobalTemplate::getMainMenu ( )
private

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

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 }
getLoginTargetPar()
Get target parameter for login.

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

Referenced by getSpecial(), and printToStdout().

+ 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.

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 }

References $_SESSION, and $txt.

Referenced by fillMessage().

+ 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.

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 }

References $i.

◆ 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 1335 of file class.ilDataCollectionGlobalTemplate.php.

1343 {
1344 global $DIC;
1345
1346 if ($add_error_mess) {
1347 $this->fillMessage();
1348 }
1349
1350 if ($add_ilias_footer) {
1351 $this->fillFooter();
1352 }
1353
1354 // set standard parts (tabs and title icon)
1355 if ($add_standard_elements) {
1356 if ($this->blockExists("content") && $a_tabs) {
1357 // determine default screen id
1358 $this->getTabsHTML();
1359 }
1360
1361 // to get also the js files for the main menu
1362 $this->getMainMenu();
1363 $this->initHelp();
1364
1365 // these fill blocks in tpl.main.html
1366 $this->fillCssFiles();
1367 $this->fillInlineCss();
1368 $this->fillBodyClass();
1369
1370 // these fill just plain placeholder variables in tpl.main.html
1371 $this->setCurrentBlock("DEFAULT");
1372 $this->fillNewContentStyle();
1373 $this->fillContentLanguage();
1374 $this->fillWindowTitle();
1375
1376 // these fill blocks in tpl.adm_content.html
1377 $this->fillHeader();
1378 $this->fillSideIcons();
1379 $this->fillScreenReaderFocus();
1380 $this->fillLeftContent();
1381 $this->fillLeftNav();
1382 $this->fillRightContent();
1383 $this->fillAdminPanel();
1384 $this->fillToolbar();
1385 $this->fillPermanentLink();
1386
1387 $this->setCenterColumnClass();
1388
1389 // late loading of javascipr files, since operations above may add files
1390 $this->fillJavaScriptFiles();
1391 $this->fillOnLoadCode();
1392
1393 // these fill just plain placeholder variables in tpl.adm_content.html
1394 if ($this->blockExists("content")) {
1395 $this->setCurrentBlock("content");
1396 if ($a_tabs) {
1397 $this->fillTabs();
1398 }
1399 $this->fillMainContent();
1400 if ($a_main_menu) {
1401 $this->fillMainMenu();
1402 }
1403 $this->fillLightbox();
1404 $this->parseCurrentBlock();
1405 }
1406 }
1407
1408 if ($handle_referer) {
1409 $this->handleReferer();
1410 }
1411
1412 if ($part == "DEFAULT") {
1413 $html = $this->template->get();
1414 } else {
1415 $html = $this->template->get($part);
1416 }
1417
1418 // save language usages as late as possible
1420
1421 return $html;
1422 }
handleReferer()
TODO: this is nice, but shouldn't be done here (-> maybe at the end of ilias.php!?...
fillCssFiles($a_force=false)
Fill in the css file tags.
fillSideIcons()
Fill side icons (upper icon, tree icon, webfolder icon)
fillScreenReaderFocus()
Accessibility focus for screen readers.
fillContentLanguage()
Add current user language to meta tags.
static _saveUsages()
Store the collected language variable usages in the user session This should be called as late as pos...

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().

+ Here is the call graph for this function:

◆ getTabsHTML()

ilDataCollectionGlobalTemplate::getTabsHTML ( )
private

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

1050 {
1051 global $DIC;
1052
1053 $ilTabs = $DIC["ilTabs"];
1054
1055 if ($this->blockExists("tabs_outer_start")) {
1056 $this->sub_tabs_html = $ilTabs->getSubTabHTML();
1057 $this->tabs_html = $ilTabs->getHTML(true);
1058 }
1059 }

References $DIC, and blockExists().

Referenced by getSpecial(), and printToStdout().

+ 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 1554 of file class.ilDataCollectionGlobalTemplate.php.

1555 {
1556 if (((substr(strrchr($_SERVER["PHP_SELF"], "/"), 1) != "error.php")
1557 && (substr(strrchr($_SERVER["PHP_SELF"], "/"), 1) != "adm_menu.php")
1558 && (substr(strrchr($_SERVER["PHP_SELF"], "/"), 1) != "chat.php"))
1559 ) {
1560 $_SESSION["post_vars"] = $_POST;
1561
1562 // referer is modified if query string contains cmd=gateway and $_POST is not empty.
1563 // this is a workaround to display formular again in case of error and if the referer points to another page
1564 $url_parts = @parse_url($_SERVER["REQUEST_URI"]);
1565 if (!$url_parts) {
1566 $protocol = (isset($_SERVER['HTTPS']) ? 'https' : 'http') . '://';
1567 $host = $_SERVER['HTTP_HOST'];
1568 $path = $_SERVER['REQUEST_URI'];
1569 $url_parts = @parse_url($protocol . $host . $path);
1570 }
1571
1572 if (isset($url_parts["query"]) && preg_match("/cmd=gateway/", $url_parts["query"]) && (isset($_POST["cmd"]["create"]))) {
1573 foreach ($_POST as $key => $val) {
1574 if (is_array($val)) {
1575 $val = key($val);
1576 }
1577
1578 $str .= "&" . $key . "=" . $val;
1579 }
1580
1581 $_SESSION["referer"] = preg_replace("/cmd=gateway/", substr($str, 1), $_SERVER["REQUEST_URI"]);
1582 $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1583 } else {
1584 if (isset($url_parts["query"]) && preg_match("/cmd=post/", $url_parts["query"]) && (isset($_POST["cmd"]["create"]))) {
1585 foreach ($_POST as $key => $val) {
1586 if (is_array($val)) {
1587 $val = key($val);
1588 }
1589
1590 $str .= "&" . $key . "=" . $val;
1591 }
1592
1593 $_SESSION["referer"] = preg_replace("/cmd=post/", substr($str, 1), $_SERVER["REQUEST_URI"]);
1594 if (isset($_GET['ref_id'])) {
1595 $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1596 } else {
1597 $_SESSION['referer_ref_id'] = 0;
1598 }
1599 } else {
1600 $_SESSION["referer"] = $_SERVER["REQUEST_URI"];
1601 if (isset($_GET['ref_id'])) {
1602 $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1603 } else {
1604 $_SESSION['referer_ref_id'] = 0;
1605 }
1606 }
1607 }
1608
1609 unset($_SESSION["error_post_vars"]);
1610 }
1611 }
$_POST["username"]

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

Referenced by getSpecial(), and printToStdout().

+ 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.

304 {
305 include_once("./Services/Help/classes/class.ilHelpGUI.php");
306 //ilHelpGUI::initHelp($this);
307 }

Referenced by getSpecial(), and printToStdout().

+ 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.

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 init(ilGlobalTemplateInterface $a_tpl=null)
Init.
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
static initjQueryUI($a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components....

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

+ 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.

@access public

Parameters
string
Returns
string

Implements ilGlobalTemplateInterface.

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

1914 {
1915 return $this->template->parseCurrentBlock($part);
1916 }

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

+ 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 1430 of file class.ilDataCollectionGlobalTemplate.php.

1431 {
1432 global $DIC;
1433
1434 $http = $DIC->http();
1435 switch ($http->request()->getHeaderLine('Accept')) {
1436 case 'application/json':
1437 $string = json_encode([
1438 self::MESSAGE_TYPE_SUCCESS => is_null($this->message[self::MESSAGE_TYPE_FAILURE]),
1439 'message' => '',
1440 ]);
1442 $http->saveResponse($http->response()->withBody($stream));
1443 $http->sendResponse();
1444 exit;
1445 default:
1446 // include yahoo dom per default
1447 include_once("./Services/YUI/classes/class.ilYuiUtil.php");
1449
1450 header('P3P: CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"');
1451 header("Content-type: text/html; charset=UTF-8");
1452
1453 $this->fillMessage();
1454
1455 // display ILIAS footer
1456 if ($part !== false) {
1457 $this->fillFooter();
1458 }
1459
1460 // set standard parts (tabs and title icon)
1461 $this->fillBodyClass();
1462 if ($a_fill_tabs) {
1463 if ($this->blockExists("content")) {
1464 // determine default screen id
1465 $this->getTabsHTML();
1466 }
1467
1468 // to get also the js files for the main menu
1469 if (!$a_skip_main_menu) {
1470 $this->getMainMenu();
1471 $this->initHelp();
1472 }
1473
1474 // these fill blocks in tpl.main.html
1475 $this->fillCssFiles();
1476 $this->fillInlineCss();
1477 //$this->fillJavaScriptFiles();
1478
1479 // these fill just plain placeholder variables in tpl.main.html
1480 $this->setCurrentBlock("DEFAULT");
1481 $this->fillNewContentStyle();
1482 $this->fillContentLanguage();
1483 $this->fillWindowTitle();
1484
1485 // these fill blocks in tpl.adm_content.html
1486 $this->fillHeader();
1487 $this->fillSideIcons();
1488 $this->fillScreenReaderFocus();
1489 $this->fillLeftContent();
1490 $this->fillLeftNav();
1491 $this->fillRightContent();
1492 $this->fillAdminPanel();
1493 $this->fillToolbar();
1494 $this->fillPermanentLink();
1495
1496 $this->setCenterColumnClass();
1497
1498 // late loading of javascipr files, since operations above may add files
1499 $this->fillJavaScriptFiles();
1500 $this->fillOnLoadCode();
1501
1502 // these fill just plain placeholder variables in tpl.adm_content.html
1503 if ($this->blockExists("content")) {
1504 $this->setCurrentBlock("content");
1505 $this->fillTabs();
1506 $this->fillMainContent();
1507 $this->fillMainMenu();
1508 $this->fillLightbox();
1509 $this->parseCurrentBlock();
1510 }
1511 }
1512
1513 if ($part == "DEFAULT" or is_bool($part)) {
1514 $html = $this->template->getUnmodified();
1515 } else {
1516 $html = $this->template->getUnmodified($part);
1517 }
1518
1519 // Modification of html is done inline here and can't be done
1520 // by ilTemplate, because the "phase" is template_show in this
1521 // case here.
1522 $ilPluginAdmin = $DIC["ilPluginAdmin"];
1523 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
1524 foreach ($pl_names as $pl) {
1525 $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
1526 $gui_class = $ui_plugin->getUIClassInstance();
1527
1528 $resp = $gui_class->getHTML(
1529 "",
1530 "template_show",
1531 array("tpl_id" => $this->tplIdentifier, "tpl_obj" => $this, "html" => $html)
1532 );
1533
1534 if ($resp["mode"] != ilUIHookPluginGUI::KEEP) {
1535 $html = $gui_class->modifyHTML($html, $resp);
1536 }
1537 }
1538
1539 // save language usages as late as possible
1541
1542 print $html;
1543
1544 $this->handleReferer();
1545 break;
1546 }
1547 }
if(! $in) print
static ofString($string)
Creates a new stream with an initial value.
Definition: Streams.php:30
const IL_COMP_SERVICE
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
static initDom(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Dom.
exit
Definition: login.php:29
$http
Definition: raiseError.php:7

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(), print, setCenterColumnClass(), and setCurrentBlock().

+ Here is the call graph for this function:

◆ printToString()

ilDataCollectionGlobalTemplate::printToString ( )

@inheritDoc

Implements ilGlobalTemplateInterface.

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

54 : string
55 {
56 throw new ilException('not implemented');
57 }
Base class for ILIAS Exception handling.

◆ 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 1825 of file class.ilDataCollectionGlobalTemplate.php.

1826 {
1827 $this->setTitle(null);
1828 $this->setTitleIcon(null);
1829 $this->setDescription(null);
1830 $this->setAlertProperties(array());
1831 $this->enableDragDropFileUpload(null);
1832
1833 // see setFullscreenHeader()
1834 if ($a_reset_header_action) {
1835 $this->setHeaderActionMenu(null);
1836 }
1837 }
setHeaderActionMenu($a_header)
Set header action menu.
enableDragDropFileUpload($a_ref_id)
Enables the file upload into this object by dropping a file.

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

+ 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.

809 {
810 $this->title_alerts = $a_props;
811 }

Referenced by clearHeader(), and resetHeaderBlock().

+ Here is the caller graph for this function:

◆ setBodyClass()

ilDataCollectionGlobalTemplate::setBodyClass (   $a_class = "")

Implements ilGlobalTemplateInterface.

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

666 {
667 $this->body_class = $a_class;
668 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setCenterColumnClass()

ilDataCollectionGlobalTemplate::setCenterColumnClass ( )
private

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

1121 {
1122 if (!$this->blockExists("center_col_width")) {
1123 return;
1124 }
1125 $center_column_class = "";
1126 if (trim($this->right_content) != "" && trim($this->left_content) != "") {
1127 $center_column_class = "two_side_col";
1128 } else {
1129 if (trim($this->right_content) != "" || trim($this->left_content) != "") {
1130 $center_column_class = "one_side_col";
1131 }
1132 }
1133
1134 switch ($center_column_class) {
1135 case "one_side_col":
1136 $center_column_class = "col-sm-9";
1137 break;
1138 case "two_side_col":
1139 $center_column_class = "col-sm-6";
1140 break;
1141 default:
1142 $center_column_class = "col-sm-12";
1143 break;
1144 }
1145 if (trim($this->left_content) != "") {
1146 $center_column_class .= " col-sm-push-3";
1147 }
1148
1149 $this->setCurrentBlock("center_col_width");
1150 $this->setVariable("CENTER_COL", $center_column_class);
1151 $this->parseCurrentBlock();
1152 }

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

Referenced by getSpecial(), and printToStdout().

+ 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 1071 of file class.ilDataCollectionGlobalTemplate.php.

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

◆ setCurrentBlock()

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

@access public

Parameters
string
Returns
???

Implements ilGlobalTemplateInterface.

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

1884 {
1885 return $this->template->setCurrentBlock($part);
1886 }

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

+ 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.

786 {
787 $this->title_desc = $a_descr;
788 }

Referenced by clearHeader(), and resetHeaderBlock().

+ 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.

840 {
841 $this->header_action = $a_header;
842 }

Referenced by resetHeaderBlock().

+ 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 1082 of file class.ilDataCollectionGlobalTemplate.php.

1083 {
1084 $this->left_content = $a_html;
1085 }

◆ setLeftNavContent()

ilDataCollectionGlobalTemplate::setLeftNavContent (   $a_content)

Sets content of left navigation column.

Implements ilGlobalTemplateInterface.

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

1092 {
1093 $this->left_nav_content = $a_content;
1094 }
$a_content
Definition: workflow.php:93

References $a_content.

◆ setLocator()

ilDataCollectionGlobalTemplate::setLocator ( )

Insert locator.

Implements ilGlobalTemplateInterface.

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

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 $uip = new ilUIHookProcessor(
977 "Services/Locator",
978 "main_locator",
979 array("locator_gui" => $ilLocator)
980 );
981 if (!$uip->replaced()) {
982 $html = $ilLocator->getHTML();
983 }
984 $html = $uip->getHTML($html);
985 } else {
986 $html = $ilLocator->getHTML();
987 }
988
989 $this->setVariable("LOCATOR", $html);
990 }
Class ilUIHookProcessor.

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

+ 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 1301 of file class.ilDataCollectionGlobalTemplate.php.

1302 {
1303 $this->login_target_par = $a_val;
1304 }

◆ 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\ilTemplate::MESSAGE_TYPE_SUCCESS, \ilTemplate::MESSAGE_TYPE_FAILURE,, \ilTemplate::MESSAGE_TYPE_QUESTION, \ilTemplate::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.

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

References $_SESSION, and $a_type.

◆ setPageFormAction()

ilDataCollectionGlobalTemplate::setPageFormAction (   $a_action)

Implements ilGlobalTemplateInterface.

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

1276 {
1277 $this->page_form_action = $a_action;
1278 }

◆ setPermanentLink()

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

Implements ilGlobalTemplateInterface.

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

1790 {
1791 $this->permanent_link = array(
1792 "type" => $a_type,
1793 "id" => $a_id,
1794 "append" => $a_append,
1795 "target" => $a_target,
1796 "title" => $a_title,
1797 );
1798 }

References $a_type.

◆ setRightContent()

ilDataCollectionGlobalTemplate::setRightContent (   $a_html)

Sets content of right column.

Implements ilGlobalTemplateInterface.

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

1115 {
1116 $this->right_content = $a_html;
1117 }

◆ setSubTabs()

ilDataCollectionGlobalTemplate::setSubTabs (   $a_tabs_html)

sets subtabs in standard template

Implements ilGlobalTemplateInterface.

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

1028 {
1029 $this->setVariable("SUB_TABS", $a_tabs_html);
1030 }

References setVariable().

+ Here is the call graph for this function:

◆ setTabs()

ilDataCollectionGlobalTemplate::setTabs (   $a_tabs_html)

sets tabs in standard template

Implements ilGlobalTemplateInterface.

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

1013 {
1014 if ($a_tabs_html != "" && $this->blockExists("tabs_outer_start")) {
1015 $this->touchBlock("tabs_outer_start");
1016 $this->touchBlock("tabs_outer_end");
1017 $this->touchBlock("tabs_inner_start");
1018 $this->touchBlock("tabs_inner_end");
1019 $this->setVariable("TABS", $a_tabs_html);
1020 }
1021 }

References blockExists(), setVariable(), and 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.

776 {
777 $this->title = $a_title;
778 $this->header_page_title = $a_title;
779 }

Referenced by clearHeader(), and resetHeaderBlock().

+ 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.

795 {
796 $this->icon_desc = $a_icon_desc;
797 $this->icon_path = $a_icon_path;
798 }

Referenced by clearHeader(), and resetHeaderBlock().

+ 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 1686 of file class.ilDataCollectionGlobalTemplate.php.

1687 {
1688 $this->tree_flat_link = $a_link;
1689 $this->tree_flat_mode = $a_mode;
1690 }

◆ setVariable()

◆ touchBlock()

ilDataCollectionGlobalTemplate::touchBlock (   $block)

overwrites ITX::touchBlock.

@access public

Parameters
string
Returns
???

Implements ilGlobalTemplateInterface.

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

1899 {
1900 return $this->template->touchBlock($block);
1901 }

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

+ Here is the caller graph for this function:

◆ variableExists()

ilDataCollectionGlobalTemplate::variableExists (   $a_variablename)
private

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

1871 {
1872 return $this->template->variableExists($a_variablename);
1873 }

Referenced by fillMainMenu(), and getMainMenu().

+ Here is the caller graph for this function:

Field Documentation

◆ $admin_panel_arrow

ilDataCollectionGlobalTemplate::$admin_panel_arrow = null
protected

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

◆ $admin_panel_bottom

ilDataCollectionGlobalTemplate::$admin_panel_bottom = null
protected

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

◆ $admin_panel_commands_toolbar

ilDataCollectionGlobalTemplate::$admin_panel_commands_toolbar = null
protected

Definition at line 1726 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 325 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 1006 of file class.ilDataCollectionGlobalTemplate.php.

◆ $tabs_html

ilDataCollectionGlobalTemplate::$tabs_html = ""
protected

Definition at line 1002 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: