ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilCOPageGlobalTemplate Class Reference

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

+ Inheritance diagram for ilCOPageGlobalTemplate:
+ Collaboration diagram for ilCOPageGlobalTemplate:

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 public. More...
 
 addBlockFile ($var, $block, $tplname, $in_module=false)
 overwrites ITX::addBlockFile public More...
 
 blockExists ($a_blockname)
 check if block exists in actual template private More...
 

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 13 of file class.ilCOPageGlobalTemplate.php.

Constructor & Destructor Documentation

◆ __construct()

ilCOPageGlobalTemplate::__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 36 of file class.ilCOPageGlobalTemplate.php.

References XapiProxy\$plugin, and setBodyClass().

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

Member Function Documentation

◆ addAdminPanelToolbar()

ilCOPageGlobalTemplate::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 1668 of file class.ilCOPageGlobalTemplate.php.

1669  {
1670  $this->admin_panel_commands_toolbar = $toolb;
1671  $this->admin_panel_arrow = $a_arrow;
1672  $this->admin_panel_bottom = $a_bottom_panel;
1673  }

◆ addBlockFile()

ilCOPageGlobalTemplate::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 1838 of file class.ilCOPageGlobalTemplate.php.

Referenced by loadStandardTemplate().

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

◆ addCss()

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

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

Implements ilGlobalTemplateInterface.

Definition at line 589 of file class.ilCOPageGlobalTemplate.php.

590  {
591  if (!array_key_exists($a_css_file . $media, $this->css_files)) {
592  $this->css_files[$a_css_file . $media] = array("file" => $a_css_file, "media" => $media);
593  }
594  }

◆ addInlineCss()

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

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

Implements ilGlobalTemplateInterface.

Definition at line 603 of file class.ilCOPageGlobalTemplate.php.

604  {
605  $this->inline_css[] = array("css" => $a_css, "media" => $media);
606  }

◆ addJavaScript()

ilCOPageGlobalTemplate::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 426 of file class.ilCOPageGlobalTemplate.php.

427  {
428  // three batches currently
429  if ($a_batch < 1 || $a_batch > 3) {
430  $a_batch = 2;
431  }
432 
433  // ensure jquery files being loaded first
434  if (is_int(strpos($a_js_file, "Services/jQuery")) ||
435  is_int(strpos($a_js_file, "/jquery.js")) ||
436  is_int(strpos($a_js_file, "/jquery-min.js"))) {
437  $a_batch = 0;
438  }
439 
440  if (!in_array($a_js_file, $this->js_files)) {
441  $this->js_files[] = $a_js_file;
442  $this->js_files_vp[$a_js_file] = $a_add_version_parameter;
443  $this->js_files_batch[$a_js_file] = $a_batch;
444  }
445  }

◆ addLightbox()

ilCOPageGlobalTemplate::addLightbox (   $a_html,
  $a_id 
)

Add lightbox html.

Implements ilGlobalTemplateInterface.

Definition at line 1630 of file class.ilCOPageGlobalTemplate.php.

1631  {
1632  $this->lightbox[$a_id] = $a_html;
1633  }

◆ addOnLoadCode()

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

Add on load code.

Implements ilGlobalTemplateInterface.

Definition at line 450 of file class.ilCOPageGlobalTemplate.php.

451  {
452  // three batches currently
453  if ($a_batch < 1 || $a_batch > 3) {
454  $a_batch = 2;
455  }
456  $this->on_load_code[$a_batch][] = $a_code;
457  }

◆ blockExists()

ilCOPageGlobalTemplate::blockExists (   $a_blockname)

check if block exists in actual template private

Parameters
stringblockname
Returns
boolean

Implements ilGlobalTemplateInterface.

Definition at line 1849 of file class.ilCOPageGlobalTemplate.php.

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

1850  {
1851  return $this->template->blockExists($a_blockname);
1852  }
+ Here is the caller graph for this function:

◆ clearHeader()

ilCOPageGlobalTemplate::clearHeader ( )

Clear header.

Implements ilGlobalTemplateInterface.

Definition at line 788 of file class.ilCOPageGlobalTemplate.php.

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

789  {
790  $this->setTitle("");
791  $this->setTitleIcon("");
792  $this->setDescription("");
793  $this->setAlertProperties(array());
794  }
setDescription($a_descr)
Sets descripton below title in standard template.
setAlertProperties(array $a_props)
Set alert properties.
setTitleIcon($a_icon_path, $a_icon_desc="")
set title icon
setTitle($a_title, $hidden=false)
Sets title in standard template.
+ Here is the call graph for this function:

◆ enableDragDropFileUpload()

ilCOPageGlobalTemplate::enableDragDropFileUpload (   $a_ref_id)

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

Implements ilGlobalTemplateInterface.

Definition at line 1768 of file class.ilCOPageGlobalTemplate.php.

Referenced by resetHeaderBlock().

1769  {
1770  $this->enable_fileupload = $a_ref_id;
1771  }
+ Here is the caller graph for this function:

◆ fillAdminPanel()

ilCOPageGlobalTemplate::fillAdminPanel ( )
private

Put admin panel into template:

  • creation selector
  • admin view on/off button

Definition at line 1680 of file class.ilCOPageGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

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

◆ fillBodyClass()

ilCOPageGlobalTemplate::fillBodyClass ( )
private

Definition at line 652 of file class.ilCOPageGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

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

◆ fillContentLanguage()

ilCOPageGlobalTemplate::fillContentLanguage ( )
private

Add current user language to meta tags.

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

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

Referenced by getSpecial(), and printToStdout().

1164  {
1165  global $DIC;
1166 
1167  $lng = $DIC->language();
1168  $ilUser = $DIC->user();
1169 
1170  $contentLanguage = 'en';
1171  $rtl = array('ar','fa','ur','he');//, 'de'); //make a list of rtl languages
1172  /* rtl-review: add "de" for testing with ltr lang shown in rtl
1173  * and set unicode-bidi to bidi-override for mirror effect */
1174  $textdir = 'ltr';
1175  if (is_object($ilUser)) {
1176  if ($ilUser->getLanguage()) {
1177  $contentLanguage = $ilUser->getLanguage();
1178  } elseif (is_object($lng)) {
1179  $contentLanguage = $lng->getDefaultLanguage();
1180  }
1181  }
1182  $this->setVariable('META_CONTENT_LANGUAGE', $contentLanguage);
1183  if (in_array($contentLanguage, $rtl)) {
1184  $textdir = 'rtl';
1185  }
1186  $this->setVariable('LANGUAGE_DIRECTION', $textdir);
1187  return true;
1188  }
$lng
$ilUser
Definition: imgupload.php:18
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillCssFiles()

ilCOPageGlobalTemplate::fillCssFiles (   $a_force = false)

Fill in the css file tags.

Parameters
boolean$a_force

Definition at line 618 of file class.ilCOPageGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

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

◆ fillFooter()

ilCOPageGlobalTemplate::fillFooter ( )
private

Fill the footer area.

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

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

Referenced by getSpecial(), and printToStdout().

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

◆ fillHeader()

ilCOPageGlobalTemplate::fillHeader ( )
private

Fill header.

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

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

Referenced by getSpecial(), and printToStdout().

832  {
833  global $DIC;
834 
835  $lng = $DIC->language();
836 
837  $icon = false;
838  if ($this->icon_path != "") {
839  $icon = true;
840  $this->setCurrentBlock("header_image");
841  if ($this->icon_desc != "") {
842  $this->setVariable("IMAGE_DESC", $lng->txt("icon") . " " . $this->icon_desc);
843  $this->setVariable("IMAGE_ALT", $lng->txt("icon") . " " . $this->icon_desc);
844  }
845 
846  $this->setVariable("IMG_HEADER", $this->icon_path);
847  $this->parseCurrentBlock();
848  $header = true;
849  }
850 
851  if ($this->title != "") {
852  $title = ilUtil::stripScriptHTML($this->title);
853  $this->setVariable("HEADER", $title);
854 
855  $header = true;
856  }
857 
858  if ($header) {
859  $this->setCurrentBlock("header_image");
860  $this->parseCurrentBlock();
861  }
862 
863  if ($this->title_desc != "") {
864  $this->setCurrentBlock("header_desc");
865  $this->setVariable("H_DESCRIPTION", $this->title_desc);
866  $this->parseCurrentBlock();
867  }
868 
869  $header = $this->getHeaderActionMenu();
870  if ($header) {
871  $this->setCurrentBlock("head_action_inner");
872  $this->setVariable("HEAD_ACTION", $header);
873  $this->parseCurrentBlock();
874  $this->touchBlock("head_action");
875  }
876 
877  if (count((array) $this->title_alerts)) {
878  foreach ($this->title_alerts as $alert) {
879  $this->setCurrentBlock('header_alert');
880  if (!($alert['propertyNameVisible'] === false)) {
881  $this->setVariable('H_PROP', $alert['property'] . ':');
882  }
883  $this->setVariable('H_VALUE', $alert['value']);
884  $this->parseCurrentBlock();
885  }
886  }
887 
888  // add file upload drop zone in header
889  if ($this->enable_fileupload != null) {
890  $ref_id = $this->enable_fileupload;
891  $upload_id = "dropzone_" . $ref_id;
892 
893  include_once("./Services/FileUpload/classes/class.ilFileUploadGUI.php");
894  $upload = new ilFileUploadGUI($upload_id, $ref_id, true);
895 
896  $this->setVariable("FILEUPLOAD_DROPZONE_ID", " id=\"$upload_id\"");
897 
898  $this->setCurrentBlock("header_fileupload");
899  $this->setVariable("HEADER_FILEUPLOAD_SCRIPT", $upload->getHTML());
900  $this->parseCurrentBlock();
901  }
902  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
getHeaderActionMenu()
Get header action menu.
touchBlock($block)
overwrites ITX::touchBlock.
static stripScriptHTML($a_str, $a_allow="", $a_rm_js=true)
strip only html tags (4.0) from text $allowed contains tags to be allowed, in format tags a and b ar...
$lng
setCurrentBlock($part="DEFAULT")
public
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillInlineCss()

ilCOPageGlobalTemplate::fillInlineCss ( )
private

Fill in the inline css.

Parameters
boolean$a_force

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

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

Referenced by getSpecial(), and printToStdout().

675  {
676  if (!$this->blockExists("css_inline")) {
677  return;
678  }
679  foreach ($this->inline_css as $css) {
680  $this->setCurrentBlock("css_inline");
681  $this->setVariable("CSS_INLINE", $css["css"]);
682  $this->parseCurrentBlock();
683  }
684  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
blockExists($a_blockname)
check if block exists in actual template private
setCurrentBlock($part="DEFAULT")
public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillJavascriptFile()

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

Definition at line 556 of file class.ilCOPageGlobalTemplate.php.

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

Referenced by fillJavaScriptFiles().

557  {
558  $this->setCurrentBlock("js_file");
559  if ($this->js_files_vp[$file]) {
560  $this->setVariable("JS_FILE", ilUtil::appendUrlParameterString($file, $vers));
561  } else {
562  $this->setVariable("JS_FILE", $file);
563  }
564  $this->parseCurrentBlock();
565  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
setCurrentBlock($part="DEFAULT")
public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillJavaScriptFiles()

ilCOPageGlobalTemplate::fillJavaScriptFiles (   $a_force = false)

Implements ilGlobalTemplateInterface.

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

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

Referenced by getSpecial(), and printToStdout().

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

◆ fillLeftContent()

ilCOPageGlobalTemplate::fillLeftContent ( )
private

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

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

Referenced by getSpecial(), and printToStdout().

1113  {
1114  if (trim($this->left_content) != "") {
1115  $this->setCurrentBlock("left_column");
1116  $this->setVariable("LEFT_CONTENT", $this->left_content);
1117  $left_col_class = (trim($this->right_content) == "")
1118  ? "col-sm-3 col-sm-pull-9"
1119  : "col-sm-3 col-sm-pull-6";
1120  $this->setVariable("LEFT_COL_CLASS", $left_col_class);
1121  $this->parseCurrentBlock();
1122  }
1123  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
setCurrentBlock($part="DEFAULT")
public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillLeftNav()

ilCOPageGlobalTemplate::fillLeftNav ( )
private

Fill left navigation frame.

Definition at line 1061 of file class.ilCOPageGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

1062  {
1063  if (trim($this->left_nav_content) != "") {
1064  $this->setCurrentBlock("left_nav");
1065  $this->setVariable("LEFT_NAV_CONTENT", $this->left_nav_content);
1066  $this->parseCurrentBlock();
1067  $this->touchBlock("left_nav_space");
1068  }
1069  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
touchBlock($block)
overwrites ITX::touchBlock.
setCurrentBlock($part="DEFAULT")
public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillLightbox()

ilCOPageGlobalTemplate::fillLightbox ( )
private

Fill lightbox content.

Parameters

Definition at line 1641 of file class.ilCOPageGlobalTemplate.php.

References setVariable().

Referenced by getSpecial(), and printToStdout().

1642  {
1643  $html = "";
1644 
1645  foreach ($this->lightbox as $lb) {
1646  $html .= $lb;
1647  }
1648  $this->setVariable("LIGHTBOX", $html);
1649  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMainContent()

ilCOPageGlobalTemplate::fillMainContent ( )
private

Definition at line 1105 of file class.ilCOPageGlobalTemplate.php.

References setVariable().

Referenced by getSpecial(), and printToStdout().

1106  {
1107  if (trim($this->main_content) != "") {
1108  $this->setVariable("ADM_CONTENT", $this->main_content);
1109  }
1110  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMainMenu()

ilCOPageGlobalTemplate::fillMainMenu ( )
private

Definition at line 276 of file class.ilCOPageGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

277  {
278  global $DIC;
279  $tpl = $DIC["tpl"];
280  if ($this->variableExists('MAINMENU')) {
281  $tpl->setVariable("MAINMENU", $this->main_menu);
282  $tpl->setVariable("MAINMENU_SPACER", $this->main_menu_spacer);
283  }
284  }
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMessage()

ilCOPageGlobalTemplate::fillMessage ( )
private

Fill message area.

Definition at line 354 of file class.ilCOPageGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

355  {
356  global $DIC;
357 
358  $out = "";
359 
360  foreach (self::$message_types as $m) {
361  $txt = $this->getMessageTextForType($m);
362 
363  if ($txt != "") {
365  }
366 
367  $request = $DIC->http()->request();
368  $accept_header = $request->getHeaderLine('Accept');
369  if (isset($_SESSION[$m]) && $_SESSION[$m] && ($accept_header !== 'application/json')) {
370  unset($_SESSION[$m]);
371  }
372  }
373 
374  if ($out != "") {
375  $this->setVariable("MESSAGE", $out);
376  }
377  }
$_SESSION["AccountId"]
static getSystemMessageHTML($a_txt, $a_type="info")
Get HTML for a system message.
$txt
Definition: error.php:13
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillNewContentStyle()

ilCOPageGlobalTemplate::fillNewContentStyle ( )
private

Fill Content Style.

Definition at line 689 of file class.ilCOPageGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

690  {
691  $this->setVariable(
692  "LOCATION_NEWCONTENT_STYLESHEET_TAG",
693  '<link rel="stylesheet" type="text/css" href="' .
695  . '" />'
696  );
697  }
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()

ilCOPageGlobalTemplate::fillOnLoadCode ( )
private

Fill add on load code.

Definition at line 536 of file class.ilCOPageGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

537  {
538  for ($i = 1; $i <= 3; $i++) {
539  if (is_array($this->on_load_code[$i])) {
540  $this->setCurrentBlock("on_load_code");
541  foreach ($this->on_load_code[$i] as $code) {
542  $this->setCurrentBlock("on_load_code_inner");
543  $this->setVariable("OLCODE", $code);
544  $this->parseCurrentBlock();
545  }
546  $this->setCurrentBlock("on_load_code");
547  $this->parseCurrentBlock();
548  }
549  }
550  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
setCurrentBlock($part="DEFAULT")
public
$i
Definition: metadata.php:24
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillPageFormAction()

ilCOPageGlobalTemplate::fillPageFormAction ( )
private

Definition at line 1224 of file class.ilCOPageGlobalTemplate.php.

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

Referenced by fillAdminPanel().

1225  {
1226  if ($this->page_form_action != "") {
1227  $this->setCurrentBlock("page_form_start");
1228  $this->setVariable("PAGE_FORM_ACTION", $this->page_form_action);
1229  $this->parseCurrentBlock();
1230  $this->touchBlock("page_form_end");
1231  }
1232  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
touchBlock($block)
overwrites ITX::touchBlock.
setCurrentBlock($part="DEFAULT")
public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillPermanentLink()

ilCOPageGlobalTemplate::fillPermanentLink ( )
private

Fill in permanent link.

Definition at line 1731 of file class.ilCOPageGlobalTemplate.php.

References setVariable().

Referenced by getSpecial(), and printToStdout().

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

◆ fillRightContent()

ilCOPageGlobalTemplate::fillRightContent ( )
private

Definition at line 1125 of file class.ilCOPageGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

1126  {
1127  if (trim($this->right_content) != "") {
1128  $this->setCurrentBlock("right_column");
1129  $this->setVariable("RIGHT_CONTENT", $this->right_content);
1130  $this->parseCurrentBlock();
1131  }
1132  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
setCurrentBlock($part="DEFAULT")
public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillScreenReaderFocus()

ilCOPageGlobalTemplate::fillScreenReaderFocus ( )
private

Accessibility focus for screen readers.

Definition at line 1554 of file class.ilCOPageGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

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

◆ fillSideIcons()

ilCOPageGlobalTemplate::fillSideIcons ( )
private

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

Definition at line 1568 of file class.ilCOPageGlobalTemplate.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().

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

◆ fillTabs()

ilCOPageGlobalTemplate::fillTabs ( )
private

Definition at line 998 of file class.ilCOPageGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

999  {
1000  if ($this->blockExists("tabs_outer_start")) {
1001  $this->touchBlock("tabs_outer_start");
1002  $this->touchBlock("tabs_outer_end");
1003  $this->touchBlock("tabs_inner_start");
1004  $this->touchBlock("tabs_inner_end");
1005 
1006  if ($this->tabs_html != "") {
1007  $this->setVariable("TABS", $this->tabs_html);
1008  }
1009  $this->setVariable("SUB_TABS", $this->sub_tabs_html);
1010  }
1011  }
touchBlock($block)
overwrites ITX::touchBlock.
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillToolbar()

ilCOPageGlobalTemplate::fillToolbar ( )
private

Definition at line 1141 of file class.ilCOPageGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

1142  {
1143  global $DIC;
1144 
1145  $ilToolbar = $DIC["ilToolbar"];
1146  ;
1147 
1148  $thtml = $ilToolbar->getHTML();
1149  if ($thtml != "") {
1150  $this->setCurrentBlock("toolbar_buttons");
1151  $this->setVariable("BUTTONS", $thtml);
1152  $this->parseCurrentBlock();
1153  }
1154  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
setCurrentBlock($part="DEFAULT")
public
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillWindowTitle()

ilCOPageGlobalTemplate::fillWindowTitle ( )
private

Definition at line 1190 of file class.ilCOPageGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

1191  {
1192  global $DIC;
1193 
1194  $ilSetting = $DIC->settings();
1195 
1196  if ($this->header_page_title != "") {
1197  $title = ilUtil::stripScriptHTML($this->header_page_title);
1198  $this->setVariable("PAGETITLE", "- " . $title);
1199  }
1200 
1201  if ($ilSetting->get('short_inst_name') != "") {
1202  $this->setVariable(
1203  "WINDOW_TITLE",
1204  $ilSetting->get('short_inst_name')
1205  );
1206  } else {
1207  $this->setVariable(
1208  "WINDOW_TITLE",
1209  "ILIAS"
1210  );
1211  }
1212  }
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 $ilSetting
Definition: privfeed.php:17
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get()

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

Implements ilGlobalTemplateInterface.

Definition at line 1782 of file class.ilCOPageGlobalTemplate.php.

1783  {
1784  return $this->template->get($part);
1785  }

◆ getHeaderActionMenu()

ilCOPageGlobalTemplate::getHeaderActionMenu ( )
private

Get header action menu.

Returns
int ref id

Definition at line 909 of file class.ilCOPageGlobalTemplate.php.

References $header_action.

Referenced by fillHeader().

+ Here is the caller graph for this function:

◆ getLoginTargetPar()

ilCOPageGlobalTemplate::getLoginTargetPar ( )
private

Get target parameter for login.

Definition at line 1252 of file class.ilCOPageGlobalTemplate.php.

Referenced by getMainMenu().

1253  {
1254  return $this->login_target_par;
1255  }
+ Here is the caller graph for this function:

◆ getMainMenu()

ilCOPageGlobalTemplate::getMainMenu ( )
private

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

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

Referenced by getSpecial(), and printToStdout().

264  {
265  global $DIC;
266 
267  $ilMainMenu = $DIC["ilMainMenu"];
268 
269  if ($this->variableExists('MAINMENU')) {
270  $ilMainMenu->setLoginTargetPar($this->getLoginTargetPar());
271  $this->main_menu = $ilMainMenu->getHTML();
272  $this->main_menu_spacer = $ilMainMenu->getSpacerClass();
273  }
274  }
getLoginTargetPar()
Get target parameter for login.
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMessageTextForType()

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

Definition at line 385 of file class.ilCOPageGlobalTemplate.php.

References $_SESSION, and $txt.

Referenced by fillMessage().

386  {
387  $txt = "";
388  if (isset($_SESSION[$m]) && $_SESSION[$m] != "") {
389  $txt = $_SESSION[$m];
390  } else {
391  if (isset($this->message[$m])) {
392  $txt = $this->message[$m];
393  }
394  }
395 
396  return $txt;
397  }
$_SESSION["AccountId"]
$txt
Definition: error.php:13
+ Here is the caller graph for this function:

◆ getOnLoadCodeForAsynch()

ilCOPageGlobalTemplate::getOnLoadCodeForAsynch ( )

Get js onload code for ajax calls.

Returns
string

Implements ilGlobalTemplateInterface.

Definition at line 464 of file class.ilCOPageGlobalTemplate.php.

References $i.

465  {
466  $js = "";
467  for ($i = 1; $i <= 3; $i++) {
468  if (is_array($this->on_load_code[$i])) {
469  foreach ($this->on_load_code[$i] as $code) {
470  $js .= $code . "\n";
471  }
472  }
473  }
474  if ($js) {
475  return '<script type="text/javascript">' . "\n" .
476  $js .
477  '</script>' . "\n";
478  }
479  }
$i
Definition: metadata.php:24

◆ getSpecial()

ilCOPageGlobalTemplate::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 1276 of file class.ilCOPageGlobalTemplate.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().

1284  {
1285  global $DIC;
1286 
1287  if ($add_error_mess) {
1288  $this->fillMessage();
1289  }
1290 
1291  if ($add_ilias_footer) {
1292  $this->fillFooter();
1293  }
1294 
1295  // set standard parts (tabs and title icon)
1296  if ($add_standard_elements) {
1297  if ($this->blockExists("content") && $a_tabs) {
1298  // determine default screen id
1299  $this->getTabsHTML();
1300  }
1301 
1302  // to get also the js files for the main menu
1303  $this->getMainMenu();
1304  $this->initHelp();
1305 
1306  // these fill blocks in tpl.main.html
1307  $this->fillCssFiles();
1308  $this->fillInlineCss();
1309  $this->fillBodyClass();
1310 
1311  // these fill just plain placeholder variables in tpl.main.html
1312  $this->setCurrentBlock("DEFAULT");
1313  $this->fillNewContentStyle();
1314  $this->fillContentLanguage();
1315  $this->fillWindowTitle();
1316 
1317  // these fill blocks in tpl.adm_content.html
1318  $this->fillHeader();
1319  $this->fillSideIcons();
1320  $this->fillScreenReaderFocus();
1321  $this->fillLeftContent();
1322  $this->fillLeftNav();
1323  $this->fillRightContent();
1324  $this->fillAdminPanel();
1325  $this->fillToolbar();
1326  $this->fillPermanentLink();
1327 
1328  $this->setCenterColumnClass();
1329 
1330  // late loading of javascipr files, since operations above may add files
1331  $this->fillJavaScriptFiles();
1332  $this->fillOnLoadCode();
1333 
1334  // these fill just plain placeholder variables in tpl.adm_content.html
1335  if ($this->blockExists("content")) {
1336  $this->setCurrentBlock("content");
1337  if ($a_tabs) {
1338  $this->fillTabs();
1339  }
1340  $this->fillMainContent();
1341  if ($a_main_menu) {
1342  $this->fillMainMenu();
1343  }
1344  $this->fillLightbox();
1345  $this->parseCurrentBlock();
1346  }
1347  }
1348 
1349  if ($handle_referer) {
1350  $this->handleReferer();
1351  }
1352 
1353  if ($part == "DEFAULT") {
1354  $html = $this->template->get();
1355  } else {
1356  $html = $this->template->get($part);
1357  }
1358 
1359  // save language usages as late as possible
1361 
1362  return $html;
1363  }
fillNewContentStyle()
Fill Content Style.
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
fillInlineCss()
Fill in the inline css.
fillSideIcons()
Fill side icons (upper icon, tree icon, webfolder icon)
fillPermanentLink()
Fill in permanent link.
blockExists($a_blockname)
check if block exists in actual template private
fillFooter()
Fill the footer area.
fillAdminPanel()
Put admin panel into template:
fillScreenReaderFocus()
Accessibility focus for screen readers.
fillCssFiles($a_force=false)
Fill in the css file tags.
setCurrentBlock($part="DEFAULT")
public
fillContentLanguage()
Add current user language to meta tags.
fillLeftNav()
Fill left navigation frame.
fillOnLoadCode()
Fill add on load code.
handleReferer()
TODO: this is nice, but shouldn&#39;t be done here (-> maybe at the end of ilias.php!?, alex)
$DIC
Definition: xapitoken.php:46
static _saveUsages()
Store the collected language variable usages in the user session This should be called as late as pos...
fillLightbox()
Fill lightbox content.
+ Here is the call graph for this function:

◆ getTabsHTML()

ilCOPageGlobalTemplate::getTabsHTML ( )
private

Definition at line 1013 of file class.ilCOPageGlobalTemplate.php.

References $DIC, and blockExists().

Referenced by getSpecial(), and printToStdout().

1014  {
1015  global $DIC;
1016 
1017  $ilTabs = $DIC["ilTabs"];
1018 
1019  if ($this->blockExists("tabs_outer_start")) {
1020  $this->sub_tabs_html = $ilTabs->getSubTabHTML();
1021  $this->tabs_html = $ilTabs->getHTML(true);
1022  }
1023  }
blockExists($a_blockname)
check if block exists in actual template private
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleReferer()

ilCOPageGlobalTemplate::handleReferer ( )
private

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

Definition at line 1494 of file class.ilCOPageGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

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

◆ hideFooter()

ilCOPageGlobalTemplate::hideFooter ( )

Make the template hide the footer.

Implements ilGlobalTemplateInterface.

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

76  {
77  $this->show_footer = false;
78  }

◆ initHelp()

ilCOPageGlobalTemplate::initHelp ( )
private

Init help.

Definition at line 296 of file class.ilCOPageGlobalTemplate.php.

Referenced by getSpecial(), and printToStdout().

297  {
298  include_once("./Services/Help/classes/class.ilHelpGUI.php");
299  //ilHelpGUI::initHelp($this);
300  }
+ Here is the caller graph for this function:

◆ loadStandardTemplate()

ilCOPageGlobalTemplate::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 713 of file class.ilCOPageGlobalTemplate.php.

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

714  {
715  if ($this->standard_template_loaded) {
716  return;
717  }
718 
719  // always load jQuery
720  include_once("./Services/jQuery/classes/class.iljQueryUtil.php");
723 
724  // always load ui framework
725  include_once("./Services/UICore/classes/class.ilUIFramework.php");
727 
728  $this->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
729  $this->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
730 
731  $this->standard_template_loaded = true;
732  }
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.
addBlockFile($var, $block, $tplname, $in_module=false)
overwrites ITX::addBlockFile public
+ Here is the call graph for this function:

◆ parseCurrentBlock()

ilCOPageGlobalTemplate::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 1824 of file class.ilCOPageGlobalTemplate.php.

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

1825  {
1826  return $this->template->parseCurrentBlock($part);
1827  }
+ Here is the caller graph for this function:

◆ printToStdout()

ilCOPageGlobalTemplate::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 1370 of file class.ilCOPageGlobalTemplate.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().

1371  {
1372  global $DIC;
1373 
1374  $http = $DIC->http();
1375  switch ($http->request()->getHeaderLine('Accept')) {
1376  case 'application/json':
1377  $string = json_encode([
1378  self::MESSAGE_TYPE_SUCCESS => is_null($this->message[self::MESSAGE_TYPE_FAILURE]),
1379  'message' => '',
1380  ]);
1381  $stream = \ILIAS\Filesystem\Stream\Streams::ofString($string);
1382  $http->saveResponse($http->response()->withBody($stream));
1383  $http->sendResponse();
1384  exit;
1385  default:
1386  // include yahoo dom per default
1387  include_once("./Services/YUI/classes/class.ilYuiUtil.php");
1389 
1390  header('P3P: CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"');
1391  header("Content-type: text/html; charset=UTF-8");
1392 
1393  $this->fillMessage();
1394 
1395  // display ILIAS footer
1396  if ($part !== false) {
1397  $this->fillFooter();
1398  }
1399 
1400  // set standard parts (tabs and title icon)
1401  $this->fillBodyClass();
1402  if ($a_fill_tabs) {
1403  if ($this->blockExists("content")) {
1404  // determine default screen id
1405  $this->getTabsHTML();
1406  }
1407 
1408  // to get also the js files for the main menu
1409  if (!$a_skip_main_menu) {
1410  $this->getMainMenu();
1411  $this->initHelp();
1412  }
1413 
1414  // these fill blocks in tpl.main.html
1415  $this->fillCssFiles();
1416  $this->fillInlineCss();
1417  //$this->fillJavaScriptFiles();
1418 
1419  // these fill just plain placeholder variables in tpl.main.html
1420  $this->setCurrentBlock("DEFAULT");
1421  $this->fillNewContentStyle();
1422  $this->fillContentLanguage();
1423  $this->fillWindowTitle();
1424 
1425  // these fill blocks in tpl.adm_content.html
1426  $this->fillHeader();
1427  $this->fillSideIcons();
1428  $this->fillScreenReaderFocus();
1429  $this->fillLeftContent();
1430  $this->fillLeftNav();
1431  $this->fillRightContent();
1432  $this->fillAdminPanel();
1433  $this->fillToolbar();
1434  $this->fillPermanentLink();
1435 
1436  $this->setCenterColumnClass();
1437 
1438  // late loading of javascipr files, since operations above may add files
1439  $this->fillJavaScriptFiles();
1440  $this->fillOnLoadCode();
1441 
1442  // these fill just plain placeholder variables in tpl.adm_content.html
1443  if ($this->blockExists("content")) {
1444  $this->setCurrentBlock("content");
1445  $this->fillTabs();
1446  $this->fillMainContent();
1447  $this->fillMainMenu();
1448  $this->fillLightbox();
1449  $this->parseCurrentBlock();
1450  }
1451  }
1452 
1453  if ($part == "DEFAULT" or is_bool($part)) {
1454  $html = $this->template->getUnmodified();
1455  } else {
1456  $html = $this->template->getUnmodified($part);
1457  }
1458 
1459  // Modification of html is done inline here and can't be done
1460  // by ilTemplate, because the "phase" is template_show in this
1461  // case here.
1462  $ilPluginAdmin = $DIC["ilPluginAdmin"];
1463  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
1464  foreach ($pl_names as $pl) {
1465  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
1466  $gui_class = $ui_plugin->getUIClassInstance();
1467 
1468  $resp = $gui_class->getHTML(
1469  "",
1470  "template_show",
1471  array("tpl_id" => $this->tplIdentifier, "tpl_obj" => $this, "html" => $html)
1472  );
1473 
1474  if ($resp["mode"] != ilUIHookPluginGUI::KEEP) {
1475  $html = $gui_class->modifyHTML($html, $resp);
1476  }
1477  }
1478 
1479  // save language usages as late as possible
1481 
1482  print $html;
1483 
1484  $this->handleReferer();
1485  break;
1486  }
1487  }
exit
Definition: login.php:29
fillNewContentStyle()
Fill Content Style.
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
fillInlineCss()
Fill in the inline css.
fillSideIcons()
Fill side icons (upper icon, tree icon, webfolder icon)
fillPermanentLink()
Fill in permanent link.
blockExists($a_blockname)
check if block exists in actual template private
fillFooter()
Fill the footer area.
static initDom(ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Dom.
fillAdminPanel()
Put admin panel into template:
fillScreenReaderFocus()
Accessibility focus for screen readers.
fillCssFiles($a_force=false)
Fill in the css file tags.
static ofString($string)
Creates a new stream with an initial value.
Definition: Streams.php:30
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
$http
Definition: raiseError.php:7
setCurrentBlock($part="DEFAULT")
public
fillContentLanguage()
Add current user language to meta tags.
fillLeftNav()
Fill left navigation frame.
fillOnLoadCode()
Fill add on load code.
handleReferer()
TODO: this is nice, but shouldn&#39;t be done here (-> maybe at the end of ilias.php!?, alex)
$DIC
Definition: xapitoken.php:46
static _saveUsages()
Store the collected language variable usages in the user session This should be called as late as pos...
const IL_COMP_SERVICE
fillLightbox()
Fill lightbox content.
+ Here is the call graph for this function:

◆ printToString()

ilCOPageGlobalTemplate::printToString ( )

Implements ilGlobalTemplateInterface.

Definition at line 52 of file class.ilCOPageGlobalTemplate.php.

52  : string
53  {
54  throw new ilException('not implemented');
55  }

◆ resetCss()

ilCOPageGlobalTemplate::resetCss ( )
private

Reset css files.

Definition at line 664 of file class.ilCOPageGlobalTemplate.php.

665  {
666  $this->css_files = array();
667  }

◆ resetHeaderBlock()

ilCOPageGlobalTemplate::resetHeaderBlock (   $a_reset_header_action = true)

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

Implements ilGlobalTemplateInterface.

Definition at line 1751 of file class.ilCOPageGlobalTemplate.php.

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

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

◆ resetJavascript()

ilCOPageGlobalTemplate::resetJavascript ( )

Reset javascript files.

Implements ilGlobalTemplateInterface.

Definition at line 487 of file class.ilCOPageGlobalTemplate.php.

488  {
489  $this->js_files = array();
490  $this->js_files_vp = array();
491  $this->js_files_batch = array();
492  }

◆ setAlertProperties()

ilCOPageGlobalTemplate::setAlertProperties ( array  $a_props)

Set alert properties.

Parameters
array$a_props
Returns
void

Implements ilGlobalTemplateInterface.

Definition at line 780 of file class.ilCOPageGlobalTemplate.php.

Referenced by clearHeader(), and resetHeaderBlock().

781  {
782  $this->title_alerts = $a_props;
783  }
+ Here is the caller graph for this function:

◆ setBodyClass()

ilCOPageGlobalTemplate::setBodyClass (   $a_class = "")

Implements ilGlobalTemplateInterface.

Definition at line 647 of file class.ilCOPageGlobalTemplate.php.

Referenced by __construct().

648  {
649  $this->body_class = $a_class;
650  }
+ Here is the caller graph for this function:

◆ setCenterColumnClass()

ilCOPageGlobalTemplate::setCenterColumnClass ( )
private

Definition at line 1079 of file class.ilCOPageGlobalTemplate.php.

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

Referenced by getSpecial(), and printToStdout().

1080  {
1081  if (!$this->blockExists("center_col_width")) {
1082  return;
1083  }
1084  $center_column_class = "";
1085  if (trim($this->right_content) != "" && trim($this->left_content) != "") {
1086  $center_column_class = "two_side_col";
1087  } elseif (trim($this->right_content) != "" || trim($this->left_content) != "") {
1088  $center_column_class = "one_side_col";
1089  }
1090 
1091  switch ($center_column_class) {
1092  case "one_side_col": $center_column_class = "col-sm-9"; break;
1093  case "two_side_col": $center_column_class = "col-sm-6"; break;
1094  default: $center_column_class = "col-sm-12"; break;
1095  }
1096  if (trim($this->left_content) != "") {
1097  $center_column_class .= " col-sm-push-3";
1098  }
1099 
1100  $this->setCurrentBlock("center_col_width");
1101  $this->setVariable("CENTER_COL", $center_column_class);
1102  $this->parseCurrentBlock();
1103  }
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
blockExists($a_blockname)
check if block exists in actual template private
setCurrentBlock($part="DEFAULT")
public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setContent()

ilCOPageGlobalTemplate::setContent (   $a_html)

Sets content for standard template.

Implements ilGlobalTemplateInterface.

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

1036  {
1037  if ($a_html != "") {
1038  $this->main_content = $a_html;
1039  }
1040  }

◆ setCurrentBlock()

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

public

Parameters
string
Returns
???

Implements ilGlobalTemplateInterface.

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

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

1803  {
1804  return $this->template->setCurrentBlock($part);
1805  }
+ Here is the caller graph for this function:

◆ setDescription()

ilCOPageGlobalTemplate::setDescription (   $a_descr)

Sets descripton below title in standard template.

Implements ilGlobalTemplateInterface.

Definition at line 761 of file class.ilCOPageGlobalTemplate.php.

Referenced by clearHeader(), and resetHeaderBlock().

762  {
763  $this->title_desc = $a_descr;
764  }
+ Here is the caller graph for this function:

◆ setHeaderActionMenu()

ilCOPageGlobalTemplate::setHeaderActionMenu (   $a_header)

Set header action menu.

Parameters
string$a_gui$a_header

Implements ilGlobalTemplateInterface.

Definition at line 810 of file class.ilCOPageGlobalTemplate.php.

Referenced by resetHeaderBlock().

811  {
812  $this->header_action = $a_header;
813  }
+ Here is the caller graph for this function:

◆ setHeaderPageTitle()

ilCOPageGlobalTemplate::setHeaderPageTitle (   $a_title)

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

Implements ilGlobalTemplateInterface.

Definition at line 823 of file class.ilCOPageGlobalTemplate.php.

824  {
825  $this->header_page_title = $a_title;
826  }

◆ setLeftContent()

ilCOPageGlobalTemplate::setLeftContent (   $a_html)

Sets content of left column.

Implements ilGlobalTemplateInterface.

Definition at line 1045 of file class.ilCOPageGlobalTemplate.php.

1046  {
1047  $this->left_content = $a_html;
1048  }

◆ setLeftNavContent()

ilCOPageGlobalTemplate::setLeftNavContent (   $a_content)

Sets content of left navigation column.

Implements ilGlobalTemplateInterface.

Definition at line 1053 of file class.ilCOPageGlobalTemplate.php.

References $a_content.

1054  {
1055  $this->left_nav_content = $a_content;
1056  }
$a_content
Definition: workflow.php:93

◆ setLocator()

ilCOPageGlobalTemplate::setLocator ( )

Insert locator.

Implements ilGlobalTemplateInterface.

Definition at line 924 of file class.ilCOPageGlobalTemplate.php.

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

925  {
926  global $DIC;
927 
928  $ilMainMenu = $DIC["ilMainMenu"];
929  $ilLocator = $DIC["ilLocator"];
930 
931  $ilPluginAdmin = $DIC["ilPluginAdmin"];
932 
933  // blog/portfolio
934  if ($ilMainMenu->getMode() == ilMainMenuGUI::MODE_TOPBAR_REDUCED ||
935  $ilMainMenu->getMode() == ilMainMenuGUI::MODE_TOPBAR_ONLY) {
936  $this->setVariable("LOCATOR", "");
937  return;
938  }
939 
940  $html = "";
941  if (is_object($ilPluginAdmin)) {
942  include_once("./Services/UIComponent/classes/class.ilUIHookProcessor.php");
943  $uip = new ilUIHookProcessor(
944  "Services/Locator",
945  "main_locator",
946  array("locator_gui" => $ilLocator)
947  );
948  if (!$uip->replaced()) {
949  $html = $ilLocator->getHTML();
950  }
951  $html = $uip->getHTML($html);
952  } else {
953  $html = $ilLocator->getHTML();
954  }
955 
956  $this->setVariable("LOCATOR", $html);
957  }
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

◆ setLoginTargetPar()

ilCOPageGlobalTemplate::setLoginTargetPar (   $a_val)

Set target parameter for login (public sector).

This is used by the main menu

Implements ilGlobalTemplateInterface.

Definition at line 1244 of file class.ilCOPageGlobalTemplate.php.

1245  {
1246  $this->login_target_par = $a_val;
1247  }

◆ setOnScreenMessage()

ilCOPageGlobalTemplate::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 339 of file class.ilCOPageGlobalTemplate.php.

References $_SESSION, and $a_type.

340  {
341  if (!in_array($a_type, self::$message_types) || $a_txt == "") {
342  return;
343  }
344  if (!$a_keep) {
345  $this->message[$a_type] = $a_txt;
346  } else {
347  $_SESSION[$a_type] = $a_txt;
348  }
349  }
$_SESSION["AccountId"]
$a_type
Definition: workflow.php:92

◆ setPageFormAction()

ilCOPageGlobalTemplate::setPageFormAction (   $a_action)

Implements ilGlobalTemplateInterface.

Definition at line 1219 of file class.ilCOPageGlobalTemplate.php.

1220  {
1221  $this->page_form_action = $a_action;
1222  }

◆ setPermanentLink()

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

Implements ilGlobalTemplateInterface.

Definition at line 1718 of file class.ilCOPageGlobalTemplate.php.

References $a_type.

1719  {
1720  $this->permanent_link = array(
1721  "type" => $a_type,
1722  "id" => $a_id,
1723  "append" => $a_append,
1724  "target" => $a_target,
1725  "title" => $a_title);
1726  }
$a_type
Definition: workflow.php:92

◆ setRightContent()

ilCOPageGlobalTemplate::setRightContent (   $a_html)

Sets content of right column.

Implements ilGlobalTemplateInterface.

Definition at line 1074 of file class.ilCOPageGlobalTemplate.php.

1075  {
1076  $this->right_content = $a_html;
1077  }

◆ setSubTabs()

ilCOPageGlobalTemplate::setSubTabs (   $a_tabs_html)

sets subtabs in standard template

Implements ilGlobalTemplateInterface.

Definition at line 993 of file class.ilCOPageGlobalTemplate.php.

References setVariable().

994  {
995  $this->setVariable("SUB_TABS", $a_tabs_html);
996  }
+ Here is the call graph for this function:

◆ setTabs()

ilCOPageGlobalTemplate::setTabs (   $a_tabs_html)

sets tabs in standard template

Implements ilGlobalTemplateInterface.

Definition at line 979 of file class.ilCOPageGlobalTemplate.php.

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

980  {
981  if ($a_tabs_html != "" && $this->blockExists("tabs_outer_start")) {
982  $this->touchBlock("tabs_outer_start");
983  $this->touchBlock("tabs_outer_end");
984  $this->touchBlock("tabs_inner_start");
985  $this->touchBlock("tabs_inner_end");
986  $this->setVariable("TABS", $a_tabs_html);
987  }
988  }
touchBlock($block)
overwrites ITX::touchBlock.
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:

◆ setTitle()

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

Sets title in standard template.

Will override the header_page_title.

Implements ilGlobalTemplateInterface.

Definition at line 752 of file class.ilCOPageGlobalTemplate.php.

Referenced by clearHeader(), and resetHeaderBlock().

753  {
754  $this->title = $a_title;
755  $this->header_page_title = $a_title;
756  }
+ Here is the caller graph for this function:

◆ setTitleIcon()

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

set title icon

Implements ilGlobalTemplateInterface.

Definition at line 769 of file class.ilCOPageGlobalTemplate.php.

Referenced by clearHeader(), and resetHeaderBlock().

770  {
771  $this->icon_desc = $a_icon_desc;
772  $this->icon_path = $a_icon_path;
773  }
+ Here is the caller graph for this function:

◆ setTreeFlatIcon()

ilCOPageGlobalTemplate::setTreeFlatIcon (   $a_link,
  $a_mode 
)

set tree/flat icon

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

Implements ilGlobalTemplateInterface.

Definition at line 1620 of file class.ilCOPageGlobalTemplate.php.

1621  {
1622  $this->tree_flat_link = $a_link;
1623  $this->tree_flat_mode = $a_mode;
1624  }

◆ setVariable()

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

◆ touchBlock()

ilCOPageGlobalTemplate::touchBlock (   $block)

overwrites ITX::touchBlock.

public

Parameters
string
Returns
???

Implements ilGlobalTemplateInterface.

Definition at line 1813 of file class.ilCOPageGlobalTemplate.php.

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

1814  {
1815  return $this->template->touchBlock($block);
1816  }
+ Here is the caller graph for this function:

◆ variableExists()

ilCOPageGlobalTemplate::variableExists (   $a_variablename)
private

Definition at line 1792 of file class.ilCOPageGlobalTemplate.php.

Referenced by fillMainMenu(), and getMainMenu().

1793  {
1794  return $this->template->variableExists($a_variablename);
1795  }
+ Here is the caller graph for this function:

Field Documentation

◆ $admin_panel_arrow

ilCOPageGlobalTemplate::$admin_panel_arrow = null
protected

Definition at line 1659 of file class.ilCOPageGlobalTemplate.php.

◆ $admin_panel_bottom

ilCOPageGlobalTemplate::$admin_panel_bottom = null
protected

Definition at line 1660 of file class.ilCOPageGlobalTemplate.php.

◆ $admin_panel_commands_toolbar

ilCOPageGlobalTemplate::$admin_panel_commands_toolbar = null
protected

Definition at line 1658 of file class.ilCOPageGlobalTemplate.php.

Referenced by fillAdminPanel().

◆ $css_files

ilCOPageGlobalTemplate::$css_files = array()
protected

Definition at line 578 of file class.ilCOPageGlobalTemplate.php.

◆ $header_action

ilCOPageGlobalTemplate::$header_action
protected

Definition at line 745 of file class.ilCOPageGlobalTemplate.php.

Referenced by getHeaderActionMenu().

◆ $header_page_title

ilCOPageGlobalTemplate::$header_page_title = ""
protected

Definition at line 741 of file class.ilCOPageGlobalTemplate.php.

◆ $inline_css

ilCOPageGlobalTemplate::$inline_css = array()
protected

Stores CSS to be included directly.

array

Definition at line 584 of file class.ilCOPageGlobalTemplate.php.

◆ $js_files

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

Definition at line 409 of file class.ilCOPageGlobalTemplate.php.

◆ $js_files_batch

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

Definition at line 421 of file class.ilCOPageGlobalTemplate.php.

◆ $js_files_vp

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

Definition at line 415 of file class.ilCOPageGlobalTemplate.php.

◆ $lightbox

ilCOPageGlobalTemplate::$lightbox = array()
protected

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

◆ $main_menu

ilCOPageGlobalTemplate::$main_menu
protected

Definition at line 256 of file class.ilCOPageGlobalTemplate.php.

◆ $main_menu_spacer

ilCOPageGlobalTemplate::$main_menu_spacer
protected

Definition at line 261 of file class.ilCOPageGlobalTemplate.php.

◆ $message

ilCOPageGlobalTemplate::$message = array()
protected

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

◆ $message_types

ilCOPageGlobalTemplate::$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 319 of file class.ilCOPageGlobalTemplate.php.

◆ $page_form_action

ilCOPageGlobalTemplate::$page_form_action = ""
protected

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

◆ $permanent_link

ilCOPageGlobalTemplate::$permanent_link = false
protected

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

◆ $show_footer

ilCOPageGlobalTemplate::$show_footer = true
private

Definition at line 70 of file class.ilCOPageGlobalTemplate.php.

◆ $standard_template_loaded

ilCOPageGlobalTemplate::$standard_template_loaded = false
protected

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

◆ $sub_tabs_html

ilCOPageGlobalTemplate::$sub_tabs_html = ""
protected

Definition at line 974 of file class.ilCOPageGlobalTemplate.php.

◆ $tabs_html

ilCOPageGlobalTemplate::$tabs_html = ""
protected

Definition at line 969 of file class.ilCOPageGlobalTemplate.php.

◆ $template

ilCOPageGlobalTemplate::$template
protected

Definition at line 25 of file class.ilCOPageGlobalTemplate.php.

◆ $title

ilCOPageGlobalTemplate::$title = ""
protected

Definition at line 742 of file class.ilCOPageGlobalTemplate.php.

Referenced by fillHeader(), and fillWindowTitle().

◆ $title_alerts

ilCOPageGlobalTemplate::$title_alerts = array()
protected

Definition at line 744 of file class.ilCOPageGlobalTemplate.php.

◆ $title_desc

ilCOPageGlobalTemplate::$title_desc = ""
protected

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

◆ $tree_flat_link

ilCOPageGlobalTemplate::$tree_flat_link = ""
protected

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

◆ MESSAGE_TYPE_FAILURE

const ilCOPageGlobalTemplate::MESSAGE_TYPE_FAILURE = 'failure'

Definition at line 311 of file class.ilCOPageGlobalTemplate.php.

◆ MESSAGE_TYPE_INFO

const ilCOPageGlobalTemplate::MESSAGE_TYPE_INFO = "info"

Definition at line 312 of file class.ilCOPageGlobalTemplate.php.

◆ MESSAGE_TYPE_QUESTION

const ilCOPageGlobalTemplate::MESSAGE_TYPE_QUESTION = "question"

Definition at line 314 of file class.ilCOPageGlobalTemplate.php.

◆ MESSAGE_TYPE_SUCCESS

const ilCOPageGlobalTemplate::MESSAGE_TYPE_SUCCESS = "success"

Definition at line 313 of file class.ilCOPageGlobalTemplate.php.


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