ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilTemplate Class Reference

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

+ Inheritance diagram for ilTemplate:
+ Collaboration diagram for ilTemplate:

Public Member Functions

 ilTemplate ($file, $flag1, $flag2, $in_module=false, $vars="DEFAULT", $plugin=false, $a_use_cache=false)
 constructor More...
 
 init ()
 
 setAddFooter ($value)
 
 getAddFooter ()
 
 getAsynch ()
 Use this for final get before sending asynchronous output (ajax) per echo to output. More...
 
 get ($part="DEFAULT", $add_error_mess=false, $handle_referer=false, $add_ilias_footer=false, $add_standard_elements=false, $a_main_menu=true, $a_tabs=true)
 ??? public More...
 
 setMessage ($a_type, $a_txt, $a_keep=false)
 Set message. More...
 
 hasMessage ($a_type)
 
 fillMessage ()
 
 getMessageHTML ($a_txt, $a_type="info")
 Get HTML for a system message. More...
 
 getContentType ()
 Get the content type for the template output. More...
 
 setContentType ($a_content_type="text/html")
 Set the content type for the template output. More...
 
 show ($part="DEFAULT", $a_fill_tabs=true, $a_skip_main_menu=false)
 public More...
 
 fillContentLanguage ()
 Add current user language to meta tags. More...
 
 fillWindowTitle ()
 
 getTabsHTML ()
 Get tabs HTML. More...
 
 fillTabs ()
 
 fillToolbar ()
 
 fillPageFormAction ()
 
 fillJavaScriptFiles ($a_force=false)
 
 fillCssFiles ($a_force=false)
 Fill in the css file tags. More...
 
 fillInlineCss ()
 Fill in the inline css. More...
 
 setContentStyleSheet ($a_style)
 Set content style (used for page content editor) More...
 
 fillContentStyle ()
 Fill Content Style. More...
 
 getMainMenu ()
 
 fillMainMenu ()
 
 initHelp ()
 Init help. More...
 
 addILIASFooter ()
 add ILIAS footer More...
 
 handleReferer ()
 TODO: this is nice, but shouldn't be done here (-> maybe at the end of ilias.php!?, alex) More...
 
 blockExists ($a_blockname)
 check if block exists in actual template private More...
 
 fillVars ()
 all template vars defined in $vars will be replaced automatically without setting and parsing them with setVariable & parseCurrentBlock private More...
 
 setCurrentBlock ($part="DEFAULT")
 Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt. 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...
 
 replaceFromDatabase (&$DB, $block, $conv, $select="default")
 ??? TODO: Adjust var names to ilias. More...
 
 prepareForFormular ($vars)
 Wird angewendet, wenn die Daten in ein Formular replaced werden sollen, Dann wird erst noch ein htmlspecialchars drumherum gemacht. More...
 
 replace ()
 ??? public More...
 
 replaceDefault ()
 ??? public More...
 
 checkTopic ($a_block, $a_topic)
 checks for a topic in the template private More...
 
 includeNavigation ()
 check if there is a NAVIGATION-topic public More...
 
 includeTree ()
 check if there is a TREE-topic public More...
 
 fileExists ($filename)
 check if a file exists public More...
 
 addBlockFile ($var, $block, $tplname, $in_module=false)
 overwrites ITX::addBlockFile public More...
 
 loadTemplatefile ( $filename, $removeUnknownVariables=true, $removeEmptyBlocks=true)
 Reads a template file from the disk. More...
 
 getTemplatePath ($a_tplname, $a_in_module=false, $a_plugin=false)
 builds a full template path with template and module name More...
 
 getTemplateIdentifier ($a_tplname, $a_in_module=false)
 get a unique template identifier More...
 
 setHeaderPageTitle ($a_title)
 
 setStyleSheetLocation ($a_stylesheet)
 
 setNewContentStyleSheetLocation ($a_stylesheet)
 
 getStandardTemplate ()
 
 setTitle ($a_title)
 sets title in standard template More...
 
 setTitleUrl ($a_url)
 sets title url in standard template More...
 
 setTitleColor ($a_val)
 Set title color. More...
 
 getTitleColor ()
 Get title color. More...
 
 setAlertProperties (array $a_props)
 Set alert properties. More...
 
 clearHeader ()
 Clear header. More...
 
 setTitleIcon ($a_icon_path, $a_icon_desc="")
 set title icon More...
 
 setBodyClass ($a_class="")
 
 fillBodyClass ()
 
 setPageFormAction ($a_action)
 
 setDescription ($a_descr)
 sets title in standard template More...
 
 stopTitleFloating ()
 set stop floating (if no tabs are used) More...
 
 setHeaderActionMenu ($a_header)
 Set header action menu. More...
 
 getHeaderActionMenu ()
 Get header action menu. More...
 
 setContent ($a_html)
 sets content for standard template More...
 
 fillMainContent ()
 Fill main content. More...
 
 setRightContent ($a_html)
 sets content of right column More...
 
 setLeftContent ($a_html)
 sets content of left column More...
 
 setLeftNavContent ($a_content)
 Sets content of left navigation column. More...
 
 fillLeftNav ()
 Fill left navigation frame. 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...
 
 setUpperIcon ($a_link, $a_frame="")
 sets icon to upper level More...
 
 setLoginTargetPar ($a_val)
 Set target parameter for login (public sector). More...
 
 getLoginTargetPar ()
 Get target parameter for login. More...
 
 fillScreenReaderFocus ()
 Accessibility focus for screen readers. More...
 
 fillSideIcons ()
 Fill side icons (upper icon, tree icon, webfolder icon) More...
 
 setMountWebfolderIcon ($a_ref_id)
 shows icon for mounting a webfolder More...
 
 setTreeFlatIcon ($a_link, $a_mode)
 set tree/flat icon 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...
 
 resetJavascript ()
 Reset javascript files. More...
 
 resetCss ()
 Reset css files. More...
 
 addOnLoadCode ($a_code, $a_batch=2)
 Add on load code. More...
 
 addCss ($a_css_file, $media="screen")
 Add a css file that should be included in the header. More...
 
 addInlineCss ($a_css, $media="screen")
 Add a css file that should be included in the header. More...
 
 addLightbox ($a_html, $a_id)
 Add lightbox html. More...
 
 fillLightbox ()
 Fill lightbox content. More...
 
 setPageActions ($a_page_actions_html)
 Show admin view button. More...
 
 setEditPageButton ($a_link, $a_txt, $a_frame)
 Show admin view button. More...
 
 addAdminPanelCommand ($a_cmd, $a_txt, $a_arrow=false)
 Add a command to the admin panel. More...
 
 addAdminPanelToolbar (ilToolbarGUI $toolb, $a_bottom_panel=true, $a_arrow=false)
 Add admin panel commands as toolbar. More...
 
 fillAdminPanel ()
 Put admin panel into template: More...
 
 setPermanentLink ($a_type, $a_id, $a_append="", $a_target="")
 
 fillPermanentLink ()
 Fill in permanent link. More...
 
 fillOnLoadCode ()
 Fill add on load code. More...
 
 getOnLoadCodeForAsynch ()
 Get js onload code for ajax calls. More...
 
 setBackgroundColor ($a_bg_color)
 
 setBanner ($a_img, $a_width=1370, $a_height=100, $a_export=false)
 Set banner. More...
 
 resetHeaderBlock ($a_reset_header_action=true)
 Set variable. More...
 
 enableDragDropFileUpload ($a_ref_id)
 Enables the file upload into this object by dropping a file. More...
 
 ilTemplate ($file, $flag1, $flag2, $in_module=false, $vars="DEFAULT")
 constructor More...
 
 getTemplatePath ($a_tplname, $a_in_module=false, $a_plugin=false)
 builds a full template path with template and module name More...
 
 addBlockFile ($var, $block, $tplname, $in_module=false)
 
 show ($part="DEFAULT")
 public More...
 
 getMessageHTML ($a_txt, $a_type="info")
 Get HTML for a system message. More...
 
 setCurrentBlock ($part="DEFAULT")
 Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt. 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...
 
 setMessage ($a_type, $a_txt, $a_keep=false)
 Set message. More...
 
 fillMessage ()
 
 blockExists ($a_blockname)
 check if block exists in actual template private More...
 
 addJavaScript ($a_js_file)
 Add a javascript file that should be included in the header. More...
 
 fillJavaScriptFiles ()
 
 addCss ($a_css_file, $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...
 
 get ($part="DEFAULT")
 
- Public Member Functions inherited from ilTemplateX
 callConstructor ()
 
 callConstructor ()
 
- Public Member Functions inherited from HTML_Template_ITX
 HTML_Template_ITX ($root='')
 Builds some complex regexps and calls the constructor of the parent class. More...
 
 init ()
 
 replaceBlock ($block, $template, $keep_content=false)
 Replaces an existing block with new content. More...
 
 replaceBlockfile ($block, $filename, $keep_content=false)
 Replaces an existing block with new content from a file. More...
 
 addBlock ($placeholder, $blockname, $template)
 Adds a block to the template changing a variable placeholder to a block placeholder. More...
 
 addBlockfile ($placeholder, $blockname, $filename)
 Adds a block taken from a file to the template changing a variable placeholder to a block placeholder. More...
 
 placeholderExists ($placeholder, $block='')
 Returns the name of the (first) block that contains the specified placeholder. More...
 
 performCallback ()
 Checks the list of function calls in the template and calls their callback function. More...
 
 getFunctioncalls ()
 Returns a list of all function calls in the current template. More...
 
 setFunctioncontent ($functionID, $replacement)
 Replaces a function call with the given replacement. More...
 
 setCallbackFunction ($tplfunction, $callbackfunction, $callbackobject='', $expandCallbackParameters=false)
 Sets a callback function. More...
 
 setCallbackFuntiontable ($functions)
 Sets the Callback function lookup table. More...
 
 removeBlockData ($block)
 Recursively removes all data assiciated with a block, including all inner blocks. More...
 
 getBlocklist ()
 Returns a list of blocknames in the template. More...
 
 blockExists ($blockname)
 Checks wheter a block exists. More...
 
 getBlockvariables ($block)
 Returns a list of variables of a block. More...
 
 BlockvariableExists ($block, $variable)
 Checks wheter a block variable exists. More...
 
 buildFunctionlist ()
 Builds a functionlist from the template. More...
 
 getValue ($code, $delimiter)
 Truncates the given code from the first occurence of $delimiter but ignores $delimiter enclosed by " or '. More...
 
 deleteFromBlockvariablelist ($block, $variables)
 Deletes one or many variables from the block variable list. More...
 
 updateBlockvariablelist ($block)
 Updates the variable list of a block. More...
 
 findPlaceholderBlocks ($variable)
 Returns an array of blocknames where the given variable placeholder is used. More...
 
 warning ($message, $file='', $line=0)
 Handles warnings, saves them to $warn and prints them or calls die() depending on the flags. More...
 
- Public Member Functions inherited from HTML_Template_IT
 HTML_Template_IT ($root='', $options=null)
 Builds some complex regular expressions and optinally sets the file root directory. More...
 
 setOption ($option, $value)
 Sets the option for the template class. More...
 
 setOptions ($options)
 Sets the options for the template class. More...
 
 show ($block='__global__')
 Print a certain block with all replacements done. More...
 
 get ($block='__global__')
 Returns a block with all replacements done. More...
 
 parse ($block='__global__', $flag_recursion=false)
 Parses the given block. More...
 
 parseCurrentBlock ()
 Parses the current block. More...
 
 setVariable ($variable, $value='')
 Sets a variable value. More...
 
 setCurrentBlock ($block='__global__')
 Sets the name of the current block that is the block where variables are added. More...
 
 touchBlock ($block)
 Preserves an empty block even if removeEmptyBlocks is true. More...
 
 init ()
 Clears all datafields of the object and rebuild the internal blocklist. More...
 
 free ()
 Clears all datafields of the object. More...
 
 setTemplate ( $template, $removeUnknownVariables=true, $removeEmptyBlocks=true)
 Sets the template. More...
 
 loadTemplatefile ( $filename, $removeUnknownVariables=true, $removeEmptyBlocks=true)
 Reads a template file from the disk. More...
 
 setRoot ($root)
 Sets the file root. More...
 
 buildBlockvariablelist ()
 Build a list of all variables within of a block. More...
 
 getGlobalvariables ()
 Returns a list of all global variables. More...
 
 findBlocks ($string)
 Recusively builds a list of all blocks within the template. More...
 
 getFile ($filename)
 Reads a file from disk and returns its content. More...
 
 _addPregDelimiters ($str)
 Adds delimiters to a string, so it can be used as a pattern in preg_* functions. More...
 
 _preserveOpeningDelimiter ($str)
 Replaces an opening delimiter by a special string. More...
 
 errorMessage ($value, $blockname='')
 Return a textual error message for a IT error code. More...
 

Static Public Member Functions

static buildLoginTarget ()
 Add current object (repository/workspace) as target for login url. More...
 

Data Fields

 $contenttype
 
 $vars
 
 $activeBlock
 
 $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()
 
 $admin_panel_commands = array()
 
- Data Fields inherited from HTML_Template_ITX
 $warn = array()
 
 $printWarning = false
 
 $haltOnWarning = false
 
 $checkblocknameRegExp = ''
 
 $functionPrefix = 'func_'
 
 $functionnameRegExp = '[_a-zA-Z]+[A-Za-z_0-9]*'
 
 $functionRegExp = ''
 
 $functions = array()
 
 $callback = array()
 
- Data Fields inherited from HTML_Template_IT
 $err = array()
 
 $clearCache = false
 
 $openingDelimiter = '{'
 
 $closingDelimiter = '}'
 
 $blocknameRegExp = '[\.0-9A-Za-z_-]+'
 
 $variablenameRegExp = '[\.0-9A-Za-z_-]+'
 
 $variablesRegExp = ''
 
 $removeVariablesRegExp = ''
 RegExp used to strip unused variable placeholder. More...
 
 $removeUnknownVariables = true
 
 $removeEmptyBlocks = true
 
 $blockRegExp = ''
 
 $currentBlock = '__global__'
 
 $template = ''
 
 $blocklist = array()
 
 $blockdata = array()
 
 $blockvariables = array()
 
 $blockinner = array()
 
 $touchedBlocks = array()
 List of blocks to preverse even if they are "empty". More...
 
 $_hiddenBlocks = array()
 List of blocks which should not be shown even if not "empty". More...
 
 $variableCache = array()
 
 $clearCacheOnParse = false
 
 $fileRoot = ''
 
 $flagBlocktrouble = false
 
 $flagGlobalParsed = false
 
 $flagCacheTemplatefile = true
 
 $lastTemplatefile = ''
 EXPERIMENTAL! FIXME! More...
 
 $_options
 $_options['preserve_data'] Whether to substitute variables and remove empty placeholders in data passed through setVariable (see also bugs #20199, #21951). More...
 

Protected Member Functions

 fillJavascriptFile ($file, $vers)
 

Protected Attributes

 $message = ""
 
 $title_desc = ""
 
 $title_url = ""
 
 $upper_icon = ""
 
 $tree_flat_link = ""
 
 $mount_webfolder = ""
 
 $stop_floating = ""
 
 $page_form_action = ""
 
 $page_actions = array()
 
 $permanent_link = false
 
 $content_style_sheet = ""
 
 $title_alerts = array()
 
 $header_action
 
 $lightbox = array()
 
 $translation_linked = false
 

Static Protected Attributes

static $il_cache = array()
 

Private Member Functions

 fillNewContentStyle ()
 Fill Content Style. More...
 
 variableExists ($a_variablename)
 
 fillHeader ()
 Fill header. More...
 
 fillStopFloating ()
 stop floating More...
 
 fillRightContent ()
 Fill right content. More...
 
 setCenterColumnClass ()
 
 fillLeftContent ()
 Fill left content. More...
 

Private Attributes

 $addFooter
 

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 11 of file class.ilTemplate.php.

Member Function Documentation

◆ addAdminPanelCommand()

ilTemplate::addAdminPanelCommand (   $a_cmd,
  $a_txt,
  $a_arrow = false 
)

Add a command to the admin panel.

Deprecated:
use addAdminPanelToolbar

Definition at line 2310 of file class.ilTemplate.php.

2311  {
2312  $this->admin_panel_commands[] =
2313  array("cmd" => $a_cmd, "txt" => $a_txt);
2314  if ($a_arrow)
2315  {
2316  $this->admin_panel_arrow = true;
2317  }
2318  $this->admin_panel_top_only = false;
2319  }

◆ addAdminPanelToolbar()

ilTemplate::addAdminPanelToolbar ( ilToolbarGUI  $toolb,
  $a_bottom_panel = true,
  $a_arrow = false 
)

Add admin panel commands as toolbar.

Parameters
ilToolbarGUI$toolb
bool$a_top_only

Definition at line 2326 of file class.ilTemplate.php.

2327  {
2328  $this->admin_panel_commands_toolbar = $toolb;
2329  $this->admin_panel_arrow = $a_arrow;
2330  $this->admin_panel_bottom = $a_bottom_panel;
2331  }

◆ addBlockFile() [1/2]

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

Definition at line 136 of file class.ilTemplate.php.

References DEBUG, and getTemplatePath().

137  {
138  if (DEBUG)
139  {
140  echo "<br/>Template '".$this->tplPath."/".$tplname."'";
141  }
142 
143  $tplfile = $this->getTemplatePath($tplname, $in_module);
144  if (file_exists($tplfile) == false)
145  {
146  echo "<br/>Template '".$tplfile."' doesn't exist! aborting...";
147  return false;
148  }
149 
150  return parent::addBlockFile($var, $block, $tplfile);
151  }
getTemplatePath($a_tplname, $a_in_module=false, $a_plugin=false)
builds a full template path with template and module name
const DEBUG
+ Here is the call graph for this function:

◆ addBlockFile() [2/2]

ilTemplate::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

Definition at line 1371 of file class.ilTemplate.php.

References HTML_Template_IT\$template, HTML_Template_ITX\addBlock(), DEBUG, HTML_Template_IT\getFile(), ilPluginAdmin\getPluginObject(), getTemplateIdentifier(), getTemplatePath(), IL_COMP_SERVICE, and ilUIHookPluginGUI\KEEP.

Referenced by getStandardTemplate().

1372  {
1373  if (DEBUG)
1374  {
1375  echo "<br/>Template '".$this->tplPath."/".$tplname."'";
1376  }
1377 
1378  $tplfile = $this->getTemplatePath($tplname, $in_module);
1379  if (file_exists($tplfile) == false)
1380  {
1381  echo "<br/>Template '".$tplfile."' doesn't exist! aborting...";
1382  return false;
1383  }
1384 
1385  $id = $this->getTemplateIdentifier($tplname, $in_module);
1386  $template = $this->getFile($tplfile);
1387 
1388  // include the template input hook
1389  global $ilPluginAdmin;
1390  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
1391  foreach ($pl_names as $pl)
1392  {
1393  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
1394  $gui_class = $ui_plugin->getUIClassInstance();
1395 
1396  $resp = $gui_class->getHTML("", "template_add",
1397  array("tpl_id" => $id, "tpl_obj" => $this, "html" => $template));
1398 
1399  if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
1400  {
1401  $template = $gui_class->modifyHTML($template, $resp);
1402  }
1403  }
1404 
1405  return $this->addBlock($var, $block, $template);
1406  }
getTemplatePath($a_tplname, $a_in_module=false, $a_plugin=false)
builds a full template path with template and module name
addBlock($placeholder, $blockname, $template)
Adds a block to the template changing a variable placeholder to a block placeholder.
Definition: ITX.php:248
const DEBUG
getTemplateIdentifier($a_tplname, $a_in_module=false)
get a unique template identifier
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
const IL_COMP_SERVICE
getFile($filename)
Reads a file from disk and returns its content.
Definition: IT.php:906
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addCss() [1/2]

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

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

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

463  {
464  if (!array_key_exists($a_css_file . $media, $this->css_files))
465  {
466  $this->css_files[$a_css_file . $media] = array("file" => $a_css_file, "media" => $media);
467  }
468  }

◆ addCss() [2/2]

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

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

Definition at line 2248 of file class.ilTemplate.php.

2249  {
2250  if (!array_key_exists($a_css_file . $media, $this->css_files))
2251  {
2252  $this->css_files[$a_css_file . $media] = array("file" => $a_css_file, "media" => $media);
2253  }
2254  }

◆ addILIASFooter()

ilTemplate::addILIASFooter ( )

add ILIAS footer

Definition at line 854 of file class.ilTemplate.php.

References $_GET, $_REQUEST, $_SESSION, $d, $file, $GLOBALS, $ilBench, $ilCtrl, $ilDB, $ilSetting, $lng, $total, ilObjLanguageAccess\_checkTranslate(), ilLink\_getStaticLink(), ilObjLanguageAccess\_getTranslationLink(), ilObjLanguageAccess\_isPageTranslation(), ilUtil\appendUrlParameterString(), getAddFooter(), ilTemplate(), ilImprint\isActive(), ilUtil\secureUrl(), HTML_Template_IT\setVariable(), ilUtil\sortArray(), and ilValidatorAdapter\validate().

Referenced by get(), and show().

855  {
856  global $ilAuth;
857 
858  if (!$this->getAddFooter()) return;
859  global $ilias, $ilClientIniFile, $ilCtrl, $ilDB, $ilSetting, $lng;
860 
861  $ftpl = new ilTemplate("tpl.footer.html", true, true, "Services/UICore");
862 
863  $ftpl->setVariable("ILIAS_VERSION", $ilias->getSetting("ilias_version"));
864 
865  $link_items = array();
866 
867  // imprint
868  include_once "Services/Imprint/classes/class.ilImprint.php";
869  if($_REQUEST["baseClass"] != "ilImprintGUI" && ilImprint::isActive())
870  {
871  include_once "Services/Link/classes/class.ilLink.php";
872  $link_items[ilLink::_getStaticLink(0, "impr")] = array($lng->txt("imprint"), true);
873  }
874 
875  $link_items["mailto:".ilUtil::prepareFormOutput($ilSetting->get("feedback_recipient"))] = array($lng->txt("contact_sysadmin"), false);
876 
877  if (DEVMODE && version_compare(PHP_VERSION,'5','>='))
878  {
879  $link_items[ilUtil::appendUrlParameterString($_SERVER["REQUEST_URI"], "do_dev_validate=xhtml")] = array("Validate", true);
880  $link_items[ilUtil::appendUrlParameterString($_SERVER["REQUEST_URI"], "do_dev_validate=accessibility")] = array("Accessibility", true);
881  }
882 
883  // output translation link (extended language maintenance)
884  if ($ilSetting->get("lang_ext_maintenance") == "1")
885  {
886  include_once("Services/Language/classes/class.ilObjLanguageAccess.php");
888  {
889  // fix #9992: remember linked translation instead of saving language usages here
890  $this->translation_linked = true;
891  $link_items[ilObjLanguageAccess::_getTranslationLink()] = array($lng->txt('translation'), true);
892  }
893  }
894 
895  $cnt = 0;
896  foreach($link_items as $url => $caption)
897  {
898  $cnt ++;
899  if($caption[1])
900  {
901  $ftpl->touchBlock("blank");
902  }
903  if($cnt < sizeof($link_items))
904  {
905  $ftpl->touchBlock("item_separator");
906  }
907 
908  $ftpl->setCurrentBlock("items");
909  $ftpl->setVariable("URL_ITEM", ilUtil::secureUrl($url));
910  $ftpl->setVariable("TXT_ITEM", $caption[0]);
911  $ftpl->parseCurrentBlock();
912  }
913 
914  if (DEVMODE)
915  {
916  // execution time
917  $t1 = explode(" ", $GLOBALS['ilGlobalStartTime']);
918  $t2 = explode(" ", microtime());
919  $diff = $t2[0] - $t1[0] + $t2[1] - $t1[1];
920 
921  $mem_usage = array();
922  if(function_exists("memory_get_usage"))
923  {
924  $mem_usage[] =
925  "Memory Usage: ".memory_get_usage()." Bytes";
926  }
927  if(function_exists("xdebug_peak_memory_usage"))
928  {
929  $mem_usage[] =
930  "XDebug Peak Memory Usage: ".xdebug_peak_memory_usage()." Bytes";
931  }
932  $mem_usage[] = round($diff, 4)." Seconds";
933 
934  if (sizeof($mem_usage))
935  {
936  $ftpl->setVariable("MEMORY_USAGE", "<br>".implode(" | ", $mem_usage));
937  }
938 
939  if (is_object($ilAuth) && isset($_SESSION[$ilAuth->_sessionName]) &&
940  isset($_SESSION[$ilAuth->_sessionName]["timestamp"]))
941  {
942  $ftpl->setVariable("SESS_INFO", "<br />maxlifetime: ".
943  ini_get("session.gc_maxlifetime")." (".
944  (ini_get("session.gc_maxlifetime")/60)."), id: ".session_id()."<br />".
945  "timestamp: ".date("Y-m-d H:i:s", $_SESSION[$ilAuth->_sessionName]["timestamp"]).
946  ", idle: ".date("Y-m-d H:i:s", $_SESSION[$ilAuth->_sessionName]["idle"]).
947  "<br />expire: ".($exp = $ilClientIniFile->readVariable("session","expire")).
948  " (".($exp/60)."), session ends at: ".
949  date("Y-m-d H:i:s", $_SESSION[$ilAuth->_sessionName]["idle"] + $exp));
950  }
951 
952  if (!empty($_GET["do_dev_validate"]) && $ftpl->blockExists("xhtml_validation"))
953  {
954  require_once("Services/XHTMLValidator/classes/class.ilValidatorAdapter.php");
955  $template2 = clone($this);
956 //echo "-".ilValidatorAdapter::validate($template2->get(), $_GET["do_dev_validate"])."-";
957  $ftpl->setCurrentBlock("xhtml_validation");
958  $ftpl->setVariable("VALIDATION",
959  ilValidatorAdapter::validate($template2->get("DEFAULT",
960  false, false, false, true), $_GET["do_dev_validate"]));
961  $ftpl->parseCurrentBlock();
962  }
963 
964  // controller history
965  if (is_object($ilCtrl) && $ftpl->blockExists("c_entry") &&
966  $ftpl->blockExists("call_history"))
967  {
968  $hist = $ilCtrl->getCallHistory();
969  foreach($hist as $entry)
970  {
971  $ftpl->setCurrentBlock("c_entry");
972  $ftpl->setVariable("C_ENTRY", $entry["class"]);
973  if (is_object($ilDB))
974  {
975  $file = $ilCtrl->lookupClassPath($entry["class"]);
976  $add = $entry["mode"]." - ".$entry["cmd"];
977  if ($file != "")
978  {
979  $add.= " - ".$file;
980  }
981  $ftpl->setVariable("C_FILE", $add);
982  }
983  $ftpl->parseCurrentBlock();
984  }
985  $ftpl->setCurrentBlock("call_history");
986  $ftpl->parseCurrentBlock();
987 
988  // debug hack
989  $debug = $ilCtrl->getDebug();
990  foreach($debug as $d)
991  {
992  $ftpl->setCurrentBlock("c_entry");
993  $ftpl->setVariable("C_ENTRY", $d);
994  $ftpl->parseCurrentBlock();
995  }
996  $ftpl->setCurrentBlock("call_history");
997  $ftpl->parseCurrentBlock();
998  }
999 
1000  // included files
1001  if (is_object($ilCtrl) && $ftpl->blockExists("i_entry") &&
1002  $ftpl->blockExists("included_files"))
1003  {
1004  $fs = get_included_files();
1005  $ifiles = array();
1006  $total = 0;
1007  foreach($fs as $f)
1008  {
1009  $ifiles[] = array("file" => $f, "size" => filesize($f));
1010  $total += filesize($f);
1011  }
1012  $ifiles = ilUtil::sortArray($ifiles, "size", "desc", true);
1013  foreach($ifiles as $f)
1014  {
1015  $ftpl->setCurrentBlock("i_entry");
1016  $ftpl->setVariable("I_ENTRY", $f["file"]." (".$f["size"]." Bytes, ".round(100 / $total * $f["size"], 2)."%)");
1017  $ftpl->parseCurrentBlock();
1018  }
1019  $ftpl->setCurrentBlock("i_entry");
1020  $ftpl->setVariable("I_ENTRY", "Total (".$total." Bytes, 100%)");
1021  $ftpl->parseCurrentBlock();
1022  $ftpl->setCurrentBlock("included_files");
1023  $ftpl->parseCurrentBlock();
1024  }
1025 
1026  }
1027 
1028  // BEGIN Usability: Non-Delos Skins can display the elapsed time in the footer
1029  // The corresponding $ilBench->start invocation is in inc.header.php
1030  global $ilBench;
1031  $ilBench->stop("Core", "ElapsedTimeUntilFooter");
1032  $ftpl->setVariable("ELAPSED_TIME",
1033  ", ".number_format($ilBench->getMeasuredTime("Core", "ElapsedTimeUntilFooter"),1).' seconds');
1034  // END Usability: Non-Delos Skins can display the elapsed time in the footer
1035 
1036  $this->setVariable("FOOTER", $ftpl->get());
1037  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
print $file
static _isPageTranslation()
Check if the current request is a page translation.
$_GET["client_id"]
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
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
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
static _getTranslationLink()
Get the link to translate the current page.
$GLOBALS['ct_recipient']
secureUrl($url)
Prepare secure href attribute.
ilTemplate($file, $flag1, $flag2, $in_module=false, $vars="DEFAULT", $plugin=false, $a_use_cache=false)
constructor
global $ilSetting
Definition: privfeed.php:40
global $lng
Definition: privfeed.php:40
global $ilBench
Definition: ilias.php:18
global $ilDB
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
static _checkTranslate()
Permission check for translations.
static isActive()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addInlineCss()

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

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

Definition at line 2259 of file class.ilTemplate.php.

2260  {
2261  $this->inline_css[] = array("css" => $a_css, "media" => $media);
2262  }

◆ addJavaScript() [1/2]

ilTemplate::addJavaScript (   $a_js_file)

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

Definition at line 434 of file class.ilTemplate.php.

435  {
436  if (!in_array($a_js_file, $this->js_files))
437  {
438  $this->js_files[] = $a_js_file;
439  }
440  }

◆ addJavaScript() [2/2]

ilTemplate::addJavaScript (   $a_js_file,
  $a_add_version_parameter = true,
  $a_batch = 2 
)

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

Definition at line 2186 of file class.ilTemplate.php.

2187  {
2188  // three batches currently
2189  if ($a_batch < 1 || $a_batch > 3)
2190  {
2191  $a_batch = 2;
2192  }
2193 
2194  // ensure jquery files being loaded first
2195  if (is_int(strpos($a_js_file, "Services/jQuery")) ||
2196  is_int(strpos($a_js_file, "/jquery.js")) ||
2197  is_int(strpos($a_js_file, "/jquery-min.js")))
2198  {
2199  $a_batch = 0;
2200  }
2201 
2202  if (!in_array($a_js_file, $this->js_files))
2203  {
2204  $this->js_files[] = $a_js_file;
2205  $this->js_files_vp[$a_js_file] = $a_add_version_parameter;
2206  $this->js_files_batch[$a_js_file] = $a_batch;
2207  }
2208  }

◆ addLightbox()

ilTemplate::addLightbox (   $a_html,
  $a_id 
)

Add lightbox html.

Definition at line 2267 of file class.ilTemplate.php.

2268  {
2269  $this->lightbox[$a_id] = $a_html;
2270  }

◆ addOnLoadCode()

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

Add on load code.

Definition at line 2235 of file class.ilTemplate.php.

Referenced by ilWikiPageGUI\initEditingJS().

2236  {
2237  // three batches currently
2238  if ($a_batch < 1 || $a_batch > 3)
2239  {
2240  $a_batch = 2;
2241  }
2242  $this->on_load_code[$a_batch][] = $a_code;
2243  }
+ Here is the caller graph for this function:

◆ blockExists() [1/2]

ilTemplate::blockExists (   $a_blockname)

check if block exists in actual template private

Parameters
stringblockname
Returns
boolean

Definition at line 425 of file class.ilTemplate.php.

426  {
427  // added second evaluation to the return statement because the first one only works for the content block (Helmut Schottmüller, 2007-09-14)
428  return (isset($this->blockvariables["content"][$a_blockname]) ? true : false) | (isset($this->blockvariables[$a_blockname]) ? true : false);
429  }

◆ blockExists() [2/2]

ilTemplate::blockExists (   $a_blockname)

check if block exists in actual template private

Parameters
stringblockname
Returns
boolean

Definition at line 1124 of file class.ilTemplate.php.

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

1125  {
1126  // added second evaluation to the return statement because the first one only works for the content block (Helmut Schottmüller, 2007-09-14)
1127  return (isset($this->blockvariables["content"][$a_blockname]) ? true : false) | (isset($this->blockvariables[$a_blockname]) ? true : false);
1128  }
+ Here is the caller graph for this function:

◆ buildLoginTarget()

static ilTemplate::buildLoginTarget ( )
static

Add current object (repository/workspace) as target for login url.

Returns
string

Definition at line 2515 of file class.ilTemplate.php.

References $_GET, $ilUser, ilObject\_lookupObjId(), ilObject\_lookupType(), and ilWorkspaceTree\lookupObjectId().

Referenced by ilMainMenuGUI\getLanguageSelection().

2516  {
2517  global $tree, $ilUser;
2518 
2519  $target_str = "";
2520 
2521  // repository
2522  if ($_GET["ref_id"] != "")
2523  {
2524  if ($tree->isInTree($_GET["ref_id"]) && $_GET["ref_id"] != $tree->getRootId())
2525  {
2526  $obj_id = ilObject::_lookupObjId($_GET["ref_id"]);
2527  $type = ilObject::_lookupType($obj_id);
2528  $target_str = $type."_".$_GET["ref_id"];
2529  }
2530  }
2531  // personal workspace
2532  else if ($_GET["wsp_id"] != "" && $_GET["wsp_id"] > 0)
2533  {
2534  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
2535  $tree = new ilWorkspaceTree($ilUser->getId());
2536  $obj_id = $tree->lookupObjectId((int)$_GET["wsp_id"]);
2537  if($obj_id)
2538  {
2539  $type = ilObject::_lookupType($obj_id);
2540  $target_str = $type."_".(int)$_GET["wsp_id"]."_wsp";
2541  }
2542  }
2543  // portfolio
2544  else if ($_GET["prt_id"] != "")
2545  {
2546  $target_str = "prtf_".(int)$_GET["prt_id"];
2547  }
2548 
2549  return $target_str;
2550  }
$_GET["client_id"]
Tree handler for personal workspace.
static _lookupObjId($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
global $ilUser
Definition: imgupload.php:15
lookupObjectId($a_node_id)
Get object id for node id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkTopic()

ilTemplate::checkTopic (   $a_block,
  $a_topic 
)

checks for a topic in the template private

Parameters
string
string
Returns
boolean

Definition at line 1326 of file class.ilTemplate.php.

Referenced by includeNavigation(), and includeTree().

1327  {
1328  return array_key_exists($a_topic, $this->blockvariables[$a_block]);
1329  }
+ Here is the caller graph for this function:

◆ clearHeader()

ilTemplate::clearHeader ( )

Clear header.

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

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

1659  {
1660  $this->setTitle("");
1661  $this->setTitleIcon("");
1662  $this->setDescription("");
1663  $this->setAlertProperties(array());
1664  }
setTitleIcon($a_icon_path, $a_icon_desc="")
set title icon
setDescription($a_descr)
sets title in standard template
setAlertProperties(array $a_props)
Set alert properties.
setTitle($a_title)
sets title in standard template
+ Here is the call graph for this function:

◆ enableDragDropFileUpload()

ilTemplate::enableDragDropFileUpload (   $a_ref_id)

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

Definition at line 2583 of file class.ilTemplate.php.

Referenced by resetHeaderBlock().

2584  {
2585  $this->enable_fileupload = $a_ref_id;
2586  }
+ Here is the caller graph for this function:

◆ fileExists()

ilTemplate::fileExists (   $filename)

check if a file exists public

Returns
boolean

Definition at line 1356 of file class.ilTemplate.php.

References $filename.

1357  {
1358  return file_exists($this->tplPath."/".$filename);
1359  }
$filename
Definition: buildRTE.php:89

◆ fillAdminPanel()

ilTemplate::fillAdminPanel ( )

Put admin panel into template:

  • creation selector
  • admin view on/off button

Definition at line 2338 of file class.ilTemplate.php.

References $cmd, $lng, fillPageFormAction(), ilUtil\getImagePath(), HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), and HTML_Template_IT\setVariable().

Referenced by get(), and show().

2339  {
2340  global $lng, $ilHelp;
2341 
2342  $adm_view_cmp = $adm_cmds = $adm_view = false;
2343 
2344  $toolb = new ilToolbarGUI();
2345 
2346  // admin panel commands
2347  if ((count($this->admin_panel_commands) > 0))
2348  {
2349  foreach($this->admin_panel_commands as $cmd)
2350  {
2351  $toolb->addFormButton($cmd["txt"], $cmd["cmd"]);
2352  }
2353  $adm_cmds = true;
2354  }
2355  elseif($this->admin_panel_commands_toolbar instanceof ilToolbarGUI)
2356  {
2357  $toolb = $this->admin_panel_commands_toolbar;
2358  $adm_cmds = true;
2359  }
2360  // Add arrow if desired
2361  if($this->admin_panel_arrow)
2362  {
2363  $toolb->setLeadingImage(ilUtil::getImagePath("arrow_upright.svg"), $lng->txt("actions"));
2364  }
2365 
2366  if ($adm_cmds)
2367  {
2368  $this->fillPageFormAction();
2369 
2370  $this->setCurrentBlock("adm_view_components");
2371  $this->setVariable("ADM_PANEL1", $toolb->getHTML());
2372  $this->parseCurrentBlock();
2373  $adm_view_cmp = true;
2374  }
2375 
2376  // admin view button
2377  if ($this->page_actions != "")
2378  {
2379  $this->setVariable("PAGE_ACTIONS", $this->page_actions);
2380  $adm_view = true;
2381  }
2382 
2383  // creation selector
2384  // see: ilObjectAddNewItemGUI
2385  // placeholder "SELECT_OBJTYPE_REPOS" still needed!
2386 
2387  if ($adm_cmds and $this->admin_panel_bottom)
2388  {
2389  $this->setCurrentBlock("adm_view_components2");
2390  if ($this->admin_panel_arrow)
2391  {
2392  $toolb->setLeadingImage(ilUtil::getImagePath("arrow_downright.svg"), $lng->txt("actions"));
2393  }
2394  $this->setVariable("ADM_PANEL2", $toolb->getHTML());
2395 
2396  $this->parseCurrentBlock();
2397  }
2398  }
$cmd
Definition: sahs_server.php:35
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillBodyClass()

ilTemplate::fillBodyClass ( )

Definition at line 1777 of file class.ilTemplate.php.

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

Referenced by get(), and show().

1778  {
1779  if ($this->body_class != "" && $this->blockExists("body_class"))
1780  {
1781  $this->setCurrentBlock("body_class");
1782  $this->setVariable("BODY_CLASS", $this->body_class);
1783  $this->parseCurrentBlock();
1784  }
1785  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillContentLanguage()

ilTemplate::fillContentLanguage ( )

Add current user language to meta tags.

public

Definition at line 592 of file class.ilTemplate.php.

References $ilUser, $lng, and HTML_Template_IT\setVariable().

Referenced by get(), and show().

593  {
594  global $ilUser,$lng;
595  $contentLanguage = 'en';
596  $rtl = array('ar','fa','ur','he');//, 'de'); //make a list of rtl languages
597  /* rtl-review: add "de" for testing with ltr lang shown in rtl
598  * and set unicode-bidi to bidi-override for mirror effect */
599  $textdir = 'ltr';
600  if(is_object($ilUser))
601  {
602  if($ilUser->getLanguage())
603  {
604  $contentLanguage = $ilUser->getLanguage();
605  }
606  else if(is_object($lng))
607  {
608  $contentLanguage = $lng->getDefaultLanguage();
609  }
610  }
611  $this->setVariable('META_CONTENT_LANGUAGE', $contentLanguage);
612  if (in_array($contentLanguage, $rtl)) {
613  $textdir = 'rtl';
614  }
615  $this->setVariable('LANGUAGE_DIRECTION', $textdir);
616  return true;
617  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
global $ilUser
Definition: imgupload.php:15
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillContentStyle()

ilTemplate::fillContentStyle ( )

Fill Content Style.

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

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

Referenced by get(), and show().

795  {
796  if ($this->content_style_sheet != "")
797  {
798  $this->setCurrentBlock("ContentStyle");
799  $this->setVariable("LOCATION_CONTENT_STYLESHEET",
800  $this->content_style_sheet);
801  $this->parseCurrentBlock();
802  }
803  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillCssFiles() [1/2]

ilTemplate::fillCssFiles (   $a_force = false)

Fill in the css file tags.

Parameters
boolean$a_force

Definition at line 475 of file class.ilTemplate.php.

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

476  {
477  if (!$this->blockExists("css_file"))
478  {
479  return;
480  }
481  foreach($this->css_files as $css)
482  {
483  $filename = $css["file"];
484  if (strpos($filename, "?") > 0) $filename = substr($filename, 0, strpos($filename, "?"));
485  if (is_file($filename) || $a_force)
486  {
487  $this->setCurrentBlock("css_file");
488  $this->setVariable("CSS_FILE", $css["file"]);
489  $this->setVariable("CSS_MEDIA", $css["media"]);
490  $this->parseCurrentBlock();
491  }
492  }
493  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
$filename
Definition: buildRTE.php:89
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:

◆ fillCssFiles() [2/2]

ilTemplate::fillCssFiles (   $a_force = false)

Fill in the css file tags.

Parameters
boolean$a_force

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

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

Referenced by get(), and show().

744  {
745  if (!$this->blockExists("css_file"))
746  {
747  return;
748  }
749  foreach($this->css_files as $css)
750  {
751  $filename = $css["file"];
752  if (strpos($filename, "?") > 0) $filename = substr($filename, 0, strpos($filename, "?"));
753  if (is_file($filename) || $a_force)
754  {
755  $this->setCurrentBlock("css_file");
756  $this->setVariable("CSS_FILE", $css["file"]);
757  $this->setVariable("CSS_MEDIA", $css["media"]);
758  $this->parseCurrentBlock();
759  }
760  }
761  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
$filename
Definition: buildRTE.php:89
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
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:

◆ fillHeader()

ilTemplate::fillHeader ( )
private

Fill header.

Definition at line 1670 of file class.ilTemplate.php.

References $ilCtrl, $ilUser, $lng, $ref_id, getHeaderActionMenu(), getTitleColor(), HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), HTML_Template_IT\setVariable(), ilUtil\stripScriptHTML(), and touchBlock().

Referenced by get(), and show().

1671  {
1672  global $lng, $ilUser, $ilCtrl;
1673 
1674  $icon = false;
1675  if ($this->icon_path != "")
1676  {
1677  $icon = true;
1678  $this->setCurrentBlock("header_image");
1679  if ($this->icon_desc != "")
1680  {
1681  $this->setVariable("IMAGE_DESC", $lng->txt("icon")." ".$this->icon_desc);
1682  $this->setVariable("IMAGE_ALT", $lng->txt("icon")." ".$this->icon_desc);
1683  }
1684 
1685  $this->setVariable("IMG_HEADER", $this->icon_path);
1686  $this->parseCurrentBlock();
1687  $header = true;
1688  }
1689 
1690  if ($this->title != "")
1691  {
1692  $this->title = ilUtil::stripScriptHTML($this->title);
1693  $this->setVariable("HEADER", $this->title);
1694  if ($this->title_url != "")
1695  {
1696  $this->setVariable("HEADER_URL", ' href="'.$this->title_url.'"');
1697  }
1698  if ($this->getTitleColor() != "")
1699  {
1700  $this->setVariable("HEADER_COLOR", " style=\"color: #".$this->getTitleColor()."\"");
1701  }
1702 
1703  if ($icon)
1704  {
1705  //$this->setVariable("HICONCL", "ilHeaderHasIcon");
1706  }
1707  $header = true;
1708  }
1709 
1710  if ($header)
1711  {
1712  $this->setCurrentBlock("header_image");
1713  $this->parseCurrentBlock();
1714  }
1715 
1716  if ($this->title_desc != "")
1717  {
1718  $this->setCurrentBlock("header_desc");
1719  $this->setVariable("H_DESCRIPTION", $this->title_desc);
1720  $this->parseCurrentBlock();
1721  }
1722 
1723  $header = $this->getHeaderActionMenu();
1724  if ($header)
1725  {
1726  $this->setCurrentBlock("head_action_inner");
1727  $this->setVariable("HEAD_ACTION", $header);
1728  $this->parseCurrentBlock();
1729  $this->touchBlock("head_action");
1730  }
1731 
1732  if(count((array) $this->title_alerts))
1733  {
1734  foreach($this->title_alerts as $alert)
1735  {
1736  $this->setCurrentBlock('header_alert');
1737  if(!($alert['propertyNameVisible'] === false))
1738  {
1739  $this->setVariable('H_PROP', $alert['property'].':');
1740  }
1741  $this->setVariable('H_VALUE', $alert['value']);
1742  $this->parseCurrentBlock();
1743  }
1744  }
1745 
1746  // add file upload drop zone in header
1747  if ($this->enable_fileupload != null)
1748  {
1749  $ref_id = $this->enable_fileupload;
1750  $upload_id = "dropzone_" . $ref_id;
1751 
1752  include_once("./Services/FileUpload/classes/class.ilFileUploadGUI.php");
1753  $upload = new ilFileUploadGUI($upload_id, $ref_id, true);
1754 
1755  $this->setVariable("FILEUPLOAD_DROPZONE_ID", " id=\"$upload_id\"");
1756 
1757  $this->setCurrentBlock("header_fileupload");
1758  $this->setVariable("HEADER_FILEUPLOAD_SCRIPT", $upload->getHTML());
1759  $this->parseCurrentBlock();
1760  }
1761  }
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 $ilCtrl
Definition: ilias.php:18
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
touchBlock($block)
overwrites ITX::touchBlock.
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
global $ilUser
Definition: imgupload.php:15
$ref_id
Definition: sahs_server.php:39
global $lng
Definition: privfeed.php:40
getTitleColor()
Get title color.
getHeaderActionMenu()
Get header action menu.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillInlineCss()

ilTemplate::fillInlineCss ( )

Fill in the inline css.

Parameters
boolean$a_force

Definition at line 768 of file class.ilTemplate.php.

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

Referenced by get(), and show().

769  {
770  if (!$this->blockExists("css_inline"))
771  {
772  return;
773  }
774  foreach($this->inline_css as $css)
775  {
776  $this->setCurrentBlock("css_file");
777  $this->setVariable("CSS_INLINE", $css["css"]);
778  //$this->setVariable("CSS_MEDIA", $css["media"]);
779  $this->parseCurrentBlock();
780  }
781  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillJavascriptFile()

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

Definition at line 119 of file class.ilTemplate.php.

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

Referenced by fillJavaScriptFiles().

120  {
121  $this->setCurrentBlock("js_file");
122  if($this->js_files_vp[$file])
123  {
124  $this->setVariable("JS_FILE", ilUtil::appendUrlParameterString($file, $vers));
125  }
126  else
127  {
128  $this->setVariable("JS_FILE", $file);
129  }
130  $this->parseCurrentBlock();
131  }
print $file
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillJavaScriptFiles() [1/2]

ilTemplate::fillJavaScriptFiles ( )

Definition at line 442 of file class.ilTemplate.php.

References $file, blockExists(), HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), and HTML_Template_IT\setVariable().

Referenced by get(), and show().

443  {
444  global $ilias,$ilTabs;
445  if ($this->blockExists("js_file"))
446  {
447  foreach($this->js_files as $file)
448  {
449  if (is_file($file) || substr($file, 0, 4) == "http")
450  {
451  $this->setCurrentBlock("js_file");
452  $this->setVariable("JS_FILE", $file);
453  $this->parseCurrentBlock();
454  }
455  }
456  }
457  }
print $file
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
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:

◆ fillJavaScriptFiles() [2/2]

ilTemplate::fillJavaScriptFiles (   $a_force = false)

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

References $file, $ilSetting, $ilUser, blockExists(), and fillJavascriptFile().

703  {
704  global $ilias, $ilTabs, $ilSetting, $ilUser;
705 
706  if (is_object($ilSetting)) // maybe this one can be removed
707  {
708  $vers = "vers=".str_replace(array(".", " "), "-", $ilSetting->get("ilias_version"));
709  }
710  if ($this->blockExists("js_file"))
711  {
712  // three batches
713  for ($i=0; $i<=3; $i++)
714  {
715  reset($this->js_files);
716  foreach($this->js_files as $file)
717  {
718  if (is_file($file) || substr($file, 0, 4) == "http" || substr($file, 0, 2) == "//" || $a_force)
719  {
720  if ($this->js_files_batch[$file] == $i)
721  {
722  $this->fillJavascriptFile($file, $vers);
723  }
724  }
725  else if(substr($file, 0, 2) == './') // #13962
726  {
727  $url_parts = parse_url($file);
728  if(is_file($url_parts['path']))
729  {
730  $this->fillJavascriptFile($file, $vers);
731  }
732  }
733  }
734  }
735  }
736  }
print $file
blockExists($a_blockname)
check if block exists in actual template private
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
fillJavascriptFile($file, $vers)
+ Here is the call graph for this function:

◆ fillLeftContent()

ilTemplate::fillLeftContent ( )
private

Fill left content.

Definition at line 1924 of file class.ilTemplate.php.

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

Referenced by get(), and show().

1925  {
1926  if (trim($this->left_content) != "")
1927  {
1928  $this->setCurrentBlock("left_column");
1929  $this->setVariable("LEFT_CONTENT", $this->left_content);
1930  $left_col_class = (trim($this->right_content) == "")
1931  ? "col-sm-3 col-sm-pull-9"
1932  : "col-sm-3 col-sm-pull-6";
1933  $this->setVariable("LEFT_COL_CLASS", $left_col_class);
1934  $this->parseCurrentBlock();
1935  }
1936  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillLeftNav()

ilTemplate::fillLeftNav ( )

Fill left navigation frame.

Definition at line 1949 of file class.ilTemplate.php.

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

Referenced by get(), and show().

1950  {
1951  if (trim($this->left_nav_content) != "")
1952  {
1953  $this->setCurrentBlock("left_nav");
1954  $this->setVariable("LEFT_NAV_CONTENT", $this->left_nav_content);
1955  $this->parseCurrentBlock();
1956  $this->touchBlock("left_nav_space");
1957  }
1958  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
touchBlock($block)
overwrites ITX::touchBlock.
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillLightbox()

ilTemplate::fillLightbox ( )

Fill lightbox content.

Parameters

Definition at line 2278 of file class.ilTemplate.php.

References HTML_Template_IT\setVariable().

Referenced by get(), and show().

2279  {
2280  $html = "";
2281 
2282  foreach ($this->lightbox as $lb)
2283  {
2284  $html.= $lb;
2285  }
2286  $this->setVariable("LIGHTBOX", $html);
2287  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMainContent()

ilTemplate::fillMainContent ( )

Fill main content.

Definition at line 1854 of file class.ilTemplate.php.

References HTML_Template_IT\setVariable().

Referenced by get(), and show().

1855  {
1856  if (trim($this->main_content) != "")
1857  {
1858  $this->setVariable("ADM_CONTENT", $this->main_content);
1859  }
1860  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMainMenu()

ilTemplate::fillMainMenu ( )

Definition at line 828 of file class.ilTemplate.php.

References $tpl, and variableExists().

Referenced by get(), and show().

829  {
830  global $tpl;
831  if($this->variableExists('MAINMENU'))
832  {
833  $tpl->setVariable("MAINMENU", $this->main_menu);
834  $tpl->setVariable("MAINMENU_SPACER", $this->main_menu_spacer);
835  }
836  }
global $tpl
Definition: ilias.php:8
variableExists($a_variablename)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMessage() [1/2]

ilTemplate::fillMessage ( )

Definition at line 360 of file class.ilTemplate.php.

References $_SESSION, $lng, $out, $txt, getMessageHTML(), and HTML_Template_IT\setVariable().

Referenced by get(), and show().

361  {
362  global $lng;
363 
364  $ms = array("info", "success", "failure", "question");
365  $out = "";
366 
367  foreach ($ms as $m)
368  {
369  $txt = "";
370  if ($m == "question")
371  {
372  $m = "mess_question";
373  }
374 
375  if (isset($_SESSION[$m]) && $_SESSION[$m] != "")
376  {
377  $txt = $_SESSION[$m];
378  }
379  else if (isset($this->message[$m]))
380  {
381  $txt = $this->message[$m];
382  }
383 
384  if ($m == "mess_question")
385  {
386  $m = "question";
387  }
388 
389  if ($txt != "")
390  {
391  $out.= $this->getMessageHTML($txt, $m);
392  }
393 
394  if ($m == "question")
395  {
396  $m = "mess_question";
397  }
398 
399  if (isset($_SESSION[$m]) && $_SESSION[$m])
400  {
401  unset($_SESSION[$m]);
402  }
403  }
404 
405  if ($out != "")
406  {
407  $this->setVariable("MESSAGE", $out);
408  }
409  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
$txt
Definition: error.php:10
getMessageHTML($a_txt, $a_type="info")
Get HTML for a system message.
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillMessage() [2/2]

ilTemplate::fillMessage ( )

Definition at line 369 of file class.ilTemplate.php.

References $lng, $out, $txt, ilSession\clear(), ilSession\get(), ilTemplate(), and HTML_Template_IT\setVariable().

370  {
371  global $lng;
372 
373  $ms = array("info", "success", "failure", "question");
374  $out = "";
375 
376  foreach ($ms as $m)
377  {
378  if ($m == "question")
379  {
380  $m = "mess_question";
381  }
382 
383  $txt = (ilSession::get($m) != "")
384  ? ilSession::get($m)
385  : $this->message[$m];
386 
387  if ($m == "mess_question")
388  {
389  $m = "question";
390  }
391 
392  if ($txt != "")
393  {
394  $mtpl = new ilTemplate("tpl.message.html", true, true, "Services/Utilities");
395  $mtpl->setCurrentBlock($m."_message");
396  $mtpl->setVariable("TEXT", $txt);
397  $mtpl->setVariable("MESSAGE_HEADING", $lng->txt($m."_message"));
398  $mtpl->parseCurrentBlock();
399  $out.= $mtpl->get();
400  }
401 
402  if ($m == "question")
403  {
404  $m = "mess_question";
405  }
406 
407  if (ilSession::get($m))
408  {
409  ilSession::clear($m);
410  }
411  }
412 
413  if ($out != "")
414  {
415  $this->setVariable("MESSAGE", $out);
416  }
417  }
static get($a_var)
Get a value.
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
static clear($a_var)
Unset a value.
$txt
Definition: error.php:10
ilTemplate($file, $flag1, $flag2, $in_module=false, $vars="DEFAULT", $plugin=false, $a_use_cache=false)
constructor
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ fillNewContentStyle()

ilTemplate::fillNewContentStyle ( )
private

Fill Content Style.

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

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

Referenced by get(), and show().

809  {
810  $this->setVariable("LOCATION_NEWCONTENT_STYLESHEET_TAG",
811  '<link rel="stylesheet" type="text/css" href="'.
813  .'" />');
814  }
static getNewContentStyleSheetLocation($mode="output")
get full style sheet file name (path inclusive) of current user
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillOnLoadCode()

ilTemplate::fillOnLoadCode ( )

Fill add on load code.

Definition at line 2429 of file class.ilTemplate.php.

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

Referenced by get(), and show().

2430  {
2431  for ($i = 1; $i <= 3; $i++)
2432  {
2433  if (is_array($this->on_load_code[$i]))
2434  {
2435  $this->setCurrentBlock("on_load_code");
2436  foreach ($this->on_load_code[$i] as $code)
2437  {
2438  $this->setCurrentBlock("on_load_code_inner");
2439  $this->setVariable("OLCODE", $code);
2440  $this->parseCurrentBlock();
2441  }
2442  $this->setCurrentBlock("on_load_code");
2443  $this->parseCurrentBlock();
2444  }
2445  }
2446  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillPageFormAction()

ilTemplate::fillPageFormAction ( )

Definition at line 691 of file class.ilTemplate.php.

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

Referenced by fillAdminPanel().

692  {
693  if ($this->page_form_action != "")
694  {
695  $this->setCurrentBlock("page_form_start");
696  $this->setVariable("PAGE_FORM_ACTION", $this->page_form_action);
697  $this->parseCurrentBlock();
698  $this->touchBlock("page_form_end");
699  }
700  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
touchBlock($block)
overwrites ITX::touchBlock.
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillPermanentLink()

ilTemplate::fillPermanentLink ( )

Fill in permanent link.

Definition at line 2412 of file class.ilTemplate.php.

References HTML_Template_IT\setVariable().

Referenced by get(), and show().

2413  {
2414  if (is_array($this->permanent_link))
2415  {
2416  include_once("./Services/PermanentLink/classes/class.ilPermanentLinkGUI.php");
2417  $plinkgui = new ilPermanentLinkGUI(
2418  $this->permanent_link["type"],
2419  $this->permanent_link["id"],
2420  $this->permanent_link["append"],
2421  $this->permanent_link["target"]);
2422  $this->setVariable("PRMLINK", $plinkgui->getHTML());
2423  }
2424  }
Class for permanent links.
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillRightContent()

ilTemplate::fillRightContent ( )
private

Fill right content.

Definition at line 1873 of file class.ilTemplate.php.

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

Referenced by get(), and show().

1874  {
1875  if (trim($this->right_content) != "")
1876  {
1877  $this->setCurrentBlock("right_column");
1878  $this->setVariable("RIGHT_CONTENT", $this->right_content);
1879  $this->parseCurrentBlock();
1880  }
1881  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillScreenReaderFocus()

ilTemplate::fillScreenReaderFocus ( )

Accessibility focus for screen readers.

Definition at line 2049 of file class.ilTemplate.php.

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

Referenced by get(), and show().

2050  {
2051  global $ilUser;
2052 
2053  if (is_object($ilUser) && $ilUser->getPref("screen_reader_optimization") && $this->blockExists("sr_focus"))
2054  {
2055  $this->touchBlock("sr_focus");
2056  }
2057  }
touchBlock($block)
overwrites ITX::touchBlock.
blockExists($a_blockname)
check if block exists in actual template private
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillSideIcons()

ilTemplate::fillSideIcons ( )

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

Definition at line 2062 of file class.ilTemplate.php.

References $ilSetting, $lng, $mount_webfolder, ilFrameTargetInfo\_getFrame(), ilAccessKeyGUI\getAttribute(), ilUtil\getImagePath(), HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), HTML_Template_IT\setVariable(), touchBlock(), ilAccessKey\TREE_OFF, and ilAccessKey\TREE_ON.

Referenced by get(), and show().

2063  {
2064  global $lng, $ilSetting;
2065 
2066  if ($this->upper_icon == "" && $this->tree_flat_link == ""
2067  && $this->mount_webfolder == "")
2068  {
2069  return;
2070  }
2071 
2072  // upper icon
2073  // deprecated
2074  if ($this->upper_icon != "")
2075  {
2076  /*if ($this->upper_icon_frame != "")
2077  {
2078  $this->setCurrentBlock("target_top");
2079  $this->setVariable("TARGET_TOP", $this->upper_icon_frame);
2080  $this->parseCurrentBlock();
2081  }
2082 
2083  $this->setCurrentBlock("alt_top");
2084  $this->setVariable("ALT_TOP", $lng->txt("up"));
2085  $this->parseCurrentBlock();
2086 
2087  $this->setCurrentBlock("top");
2088  $this->setVariable("LINK_TOP", $this->upper_icon);
2089  $this->parseCurrentBlock();*/
2090  }
2091 
2092  // tree/flat icon
2093  if ($this->tree_flat_link != "")
2094  {
2095  if ($this->left_nav_content != "")
2096  {
2097  $this->touchBlock("tree_lns");
2098  }
2099 
2100  $this->setCurrentBlock("tree_mode");
2101  $this->setVariable("LINK_MODE", $this->tree_flat_link);
2102  if ($ilSetting->get("tree_frame") == "right")
2103  {
2104  if ($this->tree_flat_mode == "tree")
2105  {
2106  $this->setVariable("IMG_TREE",ilUtil::getImagePath("icon_sidebar_on.svg"));
2107  $this->setVariable("RIGHT", "Right");
2108  }
2109  else
2110  {
2111  $this->setVariable("IMG_TREE",ilUtil::getImagePath("icon_sidebar_on.svg"));
2112  $this->setVariable("RIGHT", "Right");
2113  }
2114  }
2115  else
2116  {
2117  if ($this->tree_flat_mode == "tree")
2118  {
2119  $this->setVariable("IMG_TREE",ilUtil::getImagePath("icon_sidebar_on.svg"));
2120  }
2121  else
2122  {
2123  $this->setVariable("IMG_TREE",ilUtil::getImagePath("icon_sidebar_on.svg"));
2124  }
2125  }
2126  $this->setVariable("ALT_TREE",$lng->txt($this->tree_flat_mode."view"));
2127  $this->setVariable("TARGET_TREE", ilFrameTargetInfo::_getFrame("MainContent"));
2128  include_once("./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
2129  $this->setVariable("TREE_ACC_KEY",
2130  ilAccessKeyGUI::getAttribute(($this->tree_flat_mode == "tree")
2133  $this->parseCurrentBlock();
2134  }
2135 
2136  // mount webfolder
2137  if ($this->mount_webfolder != "")
2138  {
2139  require_once('Services/WebDAV/classes/class.ilDAVServer.php');
2140  $davServer = new ilDAVServer();
2141  $a_ref_id = $this->mount_webfolder;
2142  $a_link = $davServer->getMountURI($a_ref_id);
2143  $a_folder = $davServer->getFolderURI($a_ref_id);
2144 
2145  $this->setCurrentBlock("mount_webfolder");
2146  $this->setVariable("LINK_MOUNT_WEBFOLDER", $a_link);
2147  $this->setVariable("FOLDER_MOUNT_WEBFOLDER", $a_folder);
2148  $this->setVariable("IMG_MOUNT_WEBFOLDER",ilUtil::getImagePath("ic_mount_webfolder.png"));
2149  $this->setVariable("ALT_MOUNT_WEBFOLDER",$lng->txt("mount_webfolder"));
2150  $this->setVariable("TARGET_MOUNT_WEBFOLDER", '_blank');
2151  $this->parseCurrentBlock();
2152  }
2153 
2154  $this->setCurrentBlock("tree_icons");
2155  $this->parseCurrentBlock();
2156  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
touchBlock($block)
overwrites ITX::touchBlock.
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
static _getFrame($a_class, $a_type='')
Get content frame name.
global $ilSetting
Definition: privfeed.php:40
global $lng
Definition: privfeed.php:40
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:

◆ fillStopFloating()

ilTemplate::fillStopFloating ( )
private

stop floating

Definition at line 1812 of file class.ilTemplate.php.

References touchBlock().

Referenced by get(), and show().

1813  {
1814  if ($this->stop_floating)
1815  {
1816  $this->touchBlock("stop_floating");
1817  }
1818  }
touchBlock($block)
overwrites ITX::touchBlock.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillTabs()

ilTemplate::fillTabs ( )

Definition at line 659 of file class.ilTemplate.php.

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

Referenced by get(), and show().

660  {
661  global $ilias,$ilTabs;
662 
663  if ($this->blockExists("tabs_outer_start"))
664  {
665  $this->touchBlock("tabs_outer_start");
666  $this->touchBlock("tabs_outer_end");
667  $this->touchBlock("tabs_inner_start");
668  $this->touchBlock("tabs_inner_end");
669 
670  if ($this->thtml != "")
671  {
672  $this->setVariable("TABS",$this->thtml);
673  }
674  $this->setVariable("SUB_TABS", $this->sthtml);
675  }
676  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
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()

ilTemplate::fillToolbar ( )

Definition at line 678 of file class.ilTemplate.php.

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

Referenced by get(), and show().

679  {
680  global $ilToolbar;
681 
682  $thtml = $ilToolbar->getHTML();
683  if ($thtml != "")
684  {
685  $this->setCurrentBlock("toolbar_buttons");
686  $this->setVariable("BUTTONS", $thtml);
687  $this->parseCurrentBlock();
688  }
689  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillVars()

ilTemplate::fillVars ( )

all template vars defined in $vars will be replaced automatically without setting and parsing them with setVariable & parseCurrentBlock private

Returns
integer

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

References HTML_Template_IT\setVariable().

Referenced by parseCurrentBlock(), and touchBlock().

1142  {
1143  $count = 0;
1144  reset($this->vars);
1145 
1146  while(list($key, $val) = each($this->vars))
1147  {
1148  if (is_array($this->blockvariables[$this->activeBlock]))
1149  {
1150  if (array_key_exists($key, $this->blockvariables[$this->activeBlock]))
1151  {
1152  $count++;
1153 
1154  $this->setVariable($key, $val);
1155  }
1156  }
1157  }
1158 
1159  return $count;
1160  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fillWindowTitle()

ilTemplate::fillWindowTitle ( )

Definition at line 619 of file class.ilTemplate.php.

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

Referenced by get(), and show().

620  {
621  global $ilSetting;
622 
623  if ($this->header_page_title != "")
624  {
625  $a_title = ilUtil::stripScriptHTML($this->header_page_title);
626  $this->setVariable("PAGETITLE", "- ".$a_title);
627  }
628 
629  if ($ilSetting->get('short_inst_name') != "")
630  {
631  $this->setVariable("WINDOW_TITLE",
632  $ilSetting->get('short_inst_name'));
633  }
634  else
635  {
636  $this->setVariable("WINDOW_TITLE",
637  "ILIAS");
638  }
639  }
static stripScriptHTML($a_str, $a_allow="", $a_rm_js=true)
strip only html tags (4.0) from text $allowed contains tags to be allowed, in format tags a and b ar...
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get() [1/2]

ilTemplate::get (   $part = "DEFAULT",
  $add_error_mess = false,
  $handle_referer = false,
  $add_ilias_footer = false,
  $add_standard_elements = false,
  $a_main_menu = true,
  $a_tabs = true 
)

??? public

Parameters
string
Returns
string

Definition at line 216 of file class.ilTemplate.php.

References ilObjLanguageAccess\_saveUsages(), addILIASFooter(), blockExists(), fillAdminPanel(), fillBodyClass(), fillContentLanguage(), fillContentStyle(), fillCssFiles(), fillHeader(), fillInlineCss(), fillJavaScriptFiles(), fillLeftContent(), fillLeftNav(), fillLightbox(), fillMainContent(), fillMainMenu(), fillMessage(), fillNewContentStyle(), fillOnLoadCode(), fillPermanentLink(), fillRightContent(), fillScreenReaderFocus(), fillSideIcons(), fillStopFloating(), fillTabs(), fillToolbar(), fillWindowTitle(), getMainMenu(), ilPluginAdmin\getPluginObject(), getTabsHTML(), handleReferer(), IL_COMP_SERVICE, initHelp(), ilUIHookPluginGUI\KEEP, HTML_Template_IT\parseCurrentBlock(), setCenterColumnClass(), and setCurrentBlock().

219  {
220  if ($add_error_mess)
221  {
222  $this->fillMessage();
223  }
224 
225  if ($add_ilias_footer)
226  {
227  $this->addILIASFooter();
228  }
229 
230  // set standard parts (tabs and title icon)
231  if($add_standard_elements)
232  {
233  if ($this->blockExists("content") && $a_tabs)
234  {
235  // determine default screen id
236  $this->getTabsHTML();
237  }
238 
239  // to get also the js files for the main menu
240  $this->getMainMenu();
241  $this->initHelp();
242 
243  // these fill blocks in tpl.main.html
244  $this->fillCssFiles();
245  $this->fillInlineCss();
246  $this->fillContentStyle();
247  $this->fillBodyClass();
248 
249  // these fill just plain placeholder variables in tpl.main.html
250  $this->setCurrentBlock("DEFAULT");
251  $this->fillNewContentStyle();
252  $this->fillContentLanguage();
253  $this->fillWindowTitle();
254 
255  // these fill blocks in tpl.adm_content.html
256  $this->fillHeader();
257  $this->fillSideIcons();
258  $this->fillScreenReaderFocus();
259  $this->fillStopFloating();
260  $this->fillLeftContent();
261  $this->fillLeftNav();
262  $this->fillRightContent();
263  $this->fillAdminPanel();
264  $this->fillToolbar();
265  $this->fillPermanentLink();
266 
267  $this->setCenterColumnClass();
268 
269  // late loading of javascipr files, since operations above may add files
270  $this->fillJavaScriptFiles();
271  $this->fillOnLoadCode();
272 
273  // these fill just plain placeholder variables in tpl.adm_content.html
274  if ($this->blockExists("content"))
275  {
276  $this->setCurrentBlock("content");
277  if ($a_tabs)
278  {
279  $this->fillTabs();
280  }
281  $this->fillMainContent();
282  if ($a_main_menu)
283  {
284  $this->fillMainMenu();
285  }
286  $this->fillLightbox();
287  $this->parseCurrentBlock();
288  }
289  }
290 
291  if ($handle_referer)
292  {
293  $this->handleReferer();
294  }
295 
296  if ($part == "DEFAULT")
297  {
298  $html = parent::get();
299  }
300  else
301  {
302  $html = parent::get($part);
303  }
304 
305  // include the template output hook
306  global $ilPluginAdmin;
307  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
308  foreach ($pl_names as $pl)
309  {
310  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
311  $gui_class = $ui_plugin->getUIClassInstance();
312 
313  $resp = $gui_class->getHTML("", "template_get",
314  array("tpl_id" => $this->tplIdentifier, "tpl_obj" => $this, "html" => $html));
315 
316  if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
317  {
318  $html = $gui_class->modifyHTML($html, $resp);
319  }
320  }
321 
322  // fix #9992: save language usages as late as possible
323  if ($this->translation_linked)
324  {
326  }
327 
328  return $html;
329  }
fillNewContentStyle()
Fill Content Style.
fillScreenReaderFocus()
Accessibility focus for screen readers.
getTabsHTML()
Get tabs HTML.
fillPermanentLink()
Fill in permanent link.
fillLeftContent()
Fill left content.
fillOnLoadCode()
Fill add on load code.
fillStopFloating()
stop floating
fillHeader()
Fill header.
fillAdminPanel()
Put admin panel into template:
fillSideIcons()
Fill side icons (upper icon, tree icon, webfolder icon)
fillLeftNav()
Fill left navigation frame.
initHelp()
Init help.
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
fillLightbox()
Fill lightbox content.
fillRightContent()
Fill right content.
fillContentLanguage()
Add current user language to meta tags.
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
handleReferer()
TODO: this is nice, but shouldn&#39;t be done here (-> maybe at the end of ilias.php!?, alex)
fillCssFiles($a_force=false)
Fill in the css file tags.
blockExists($a_blockname)
check if block exists in actual template private
fillMainContent()
Fill main content.
static _saveUsages()
Store the collected usages in the user session.
fillContentStyle()
Fill Content Style.
fillInlineCss()
Fill in the inline css.
addILIASFooter()
add ILIAS footer
const IL_COMP_SERVICE
+ Here is the call graph for this function:

◆ get() [2/2]

ilTemplate::get (   $part = "DEFAULT")

Definition at line 496 of file class.ilTemplate.php.

497  {
498  if ($part == "DEFAULT")
499  {
500  return parent::get();
501  }
502  else
503  {
504  return parent::get($part);
505  }
506  }

◆ getAddFooter()

ilTemplate::getAddFooter ( )

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

References $addFooter.

Referenced by addILIASFooter().

195  {
196  return $this->addFooter;
197  }
+ Here is the caller graph for this function:

◆ getAsynch()

ilTemplate::getAsynch ( )

Use this for final get before sending asynchronous output (ajax) per echo to output.

Definition at line 204 of file class.ilTemplate.php.

References getContentType().

205  {
206  header("Content-type: " . $this->getContentType() . "; charset=UTF-8");
207  return $this->get();
208  }
getContentType()
Get the content type for the template output.
+ Here is the call graph for this function:

◆ getContentType()

ilTemplate::getContentType ( )

Get the content type for the template output.

Returns
string Content type public

Definition at line 432 of file class.ilTemplate.php.

References $contenttype.

Referenced by getAsynch(), and show().

433  {
434  return $this->contenttype;
435  }
+ Here is the caller graph for this function:

◆ getHeaderActionMenu()

ilTemplate::getHeaderActionMenu ( )

Get header action menu.

Returns
int ref id

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

References $header_action.

Referenced by fillHeader().

1836  {
1837  return $this->header_action;
1838  }
+ Here is the caller graph for this function:

◆ getLoginTargetPar()

ilTemplate::getLoginTargetPar ( )

Get target parameter for login.

Definition at line 2041 of file class.ilTemplate.php.

Referenced by getMainMenu().

2042  {
2043  return $this->login_target_par;
2044  }
+ Here is the caller graph for this function:

◆ getMainMenu()

ilTemplate::getMainMenu ( )

Definition at line 816 of file class.ilTemplate.php.

References getLoginTargetPar(), and variableExists().

Referenced by get(), and show().

817  {
818  global $ilMainMenu;
819 
820  if($this->variableExists('MAINMENU'))
821  {
822  $ilMainMenu->setLoginTargetPar($this->getLoginTargetPar());
823  $this->main_menu = $ilMainMenu->getHTML();
824  $this->main_menu_spacer = $ilMainMenu->getSpacerClass();
825  }
826  }
getLoginTargetPar()
Get target parameter for login.
variableExists($a_variablename)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMessageHTML() [1/2]

ilTemplate::getMessageHTML (   $a_txt,
  $a_type = "info" 
)

Get HTML for a system message.

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

References $lng, and ilTemplate().

262  {
263  global $lng;
264 
265  $mtpl = new ilTemplate("tpl.message.html", true, true, "Services/Utilities");
266  $mtpl->setCurrentBlock($a_type."_message");
267  $mtpl->setVariable("TEXT", $a_txt);
268  $mtpl->setVariable("MESSAGE_HEADING", $lng->txt($a_type."_message"));
269  $mtpl->parseCurrentBlock();
270 
271  return $mtpl->get();
272  }
ilTemplate($file, $flag1, $flag2, $in_module=false, $vars="DEFAULT", $plugin=false, $a_use_cache=false)
constructor
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ getMessageHTML() [2/2]

ilTemplate::getMessageHTML (   $a_txt,
  $a_type = "info" 
)

Get HTML for a system message.

Definition at line 414 of file class.ilTemplate.php.

References $lng, and ilTemplate().

Referenced by fillMessage(), and show().

415  {
416  global $lng;
417  $mtpl = new ilTemplate("tpl.message.html", true, true, "Services/Utilities");
418  $mtpl->setCurrentBlock($a_type."_message");
419  $mtpl->setVariable("TEXT", $a_txt);
420  $mtpl->setVariable("MESSAGE_HEADING", $lng->txt($a_type."_message"));
421  $mtpl->parseCurrentBlock();
422 
423  return $mtpl->get();
424  }
ilTemplate($file, $flag1, $flag2, $in_module=false, $vars="DEFAULT", $plugin=false, $a_use_cache=false)
constructor
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOnLoadCodeForAsynch()

ilTemplate::getOnLoadCodeForAsynch ( )

Get js onload code for ajax calls.

Returns
string

Definition at line 2453 of file class.ilTemplate.php.

2454  {
2455  $js = "";
2456  for ($i = 1; $i <= 3; $i++)
2457  {
2458  if (is_array($this->on_load_code[$i]))
2459  {
2460  foreach ($this->on_load_code[$i] as $code)
2461  {
2462  $js .= $code."\n";
2463  }
2464  }
2465  }
2466  if($js)
2467  {
2468  return '<script type="text/javascript">'."\n".
2469  $js.
2470  '</script>'."\n";
2471  }
2472  }

◆ getStandardTemplate()

ilTemplate::getStandardTemplate ( )

Definition at line 1590 of file class.ilTemplate.php.

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

1591  {
1592  // always load jQuery
1593  include_once("./Services/jQuery/classes/class.iljQueryUtil.php");
1595 
1596  // always load ui framework
1597  include_once("./Services/UICore/classes/class.ilUIFramework.php");
1599 
1600  // always load Basic js
1601 // $this->addJavaScript("./Services/JavaScript/js/Basic.js",
1602 // true, 1);
1603 
1604  $this->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
1605  $this->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
1606  }
addBlockFile($var, $block, $tplname, $in_module=false)
overwrites ITX::addBlockFile public
static initjQuery($a_tpl=null)
Init jQuery.
init($a_tpl=null)
Init.
+ Here is the call graph for this function:

◆ getTabsHTML()

ilTemplate::getTabsHTML ( )

Get tabs HTML.

Parameters

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

References blockExists().

Referenced by get(), and show().

648  {
649  global $ilTabs;
650 
651  if ($this->blockExists("tabs_outer_start"))
652  {
653  $this->sthtml = $ilTabs->getSubTabHTML();
654  $this->thtml = $ilTabs->getHTML((trim($sthtml) == ""));
655  }
656  }
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:

◆ getTemplateIdentifier()

ilTemplate::getTemplateIdentifier (   $a_tplname,
  $a_in_module = false 
)

get a unique template identifier

The identifier is common for default or customized skins but distincts templates of different services with the same name.

This is used by the UI plugin hook for template input/output

Parameters
string$a_tplnametemplate name
string$in_moduleComponent, e.g. "Modules/Forum" boolean $in_module or true, if component should be determined by ilCtrl
Returns
string template identifier, e.g. "Services/Calendar/tpl.minical.html", "tpl.confirm.html"

Definition at line 1537 of file class.ilTemplate.php.

References $_GET, $ilCtrl, and ILIAS_MODULE.

Referenced by addBlockFile(), and ilTemplate().

1538  {
1539  global $ilCtrl;
1540 
1541  // if baseClass functionality is used (ilias.php):
1542  // get template directory from ilCtrl
1543  if (!empty($_GET["baseClass"]) && $a_in_module === true)
1544  {
1545  $a_in_module = $ilCtrl->getModuleDir();
1546  }
1547 
1548  if (strpos($a_tplname,"/") === false)
1549  {
1550  if ($a_in_module)
1551  {
1552  if ($a_in_module === true)
1553  {
1554  $module_path = ILIAS_MODULE."/";
1555  }
1556  else
1557  {
1558  $module_path = $a_in_module."/";
1559  }
1560  }
1561  else
1562  {
1563  $module_path = "";
1564  }
1565 
1566  return $module_path.basename($a_tplname);
1567  }
1568  else
1569  {
1570  return $a_tplname;
1571  }
1572  }
const ILIAS_MODULE
Definition: payment.php:15
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ getTemplatePath() [1/2]

ilTemplate::getTemplatePath (   $a_tplname,
  $a_in_module = false,
  $a_plugin = false 
)

builds a full template path with template and module name

Parameters
string$a_tplnametemplate name
boolean$in_moduleshould be set to true, if template file is in module subdirectory
Returns
string full template path

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

References $_GET, $ilCtrl, and ILIAS_MODULE.

89  {
90  global $ilias, $ilCtrl;
91 
92  // if baseClass functionality is used (ilias.php):
93  // get template directory from ilCtrl
94  if (!empty($_GET["baseClass"]) && $a_in_module === true)
95  {
96  $a_in_module = $ilCtrl->getModuleDir();
97  }
98 
99  if (strpos($a_tplname,"/") === false)
100  {
101  $module_path = "";
102 
103  //$fname = $ilias->tplPath;
104  if ($a_in_module)
105  {
106  if ($a_in_module === true)
107  {
108  $module_path = ILIAS_MODULE."/";
109  }
110  else
111  {
112  $module_path = $a_in_module."/";
113  }
114  }
115 
116  if($fname == "" || !file_exists($fname))
117  {
118  if ($a_in_module == "setup")
119  {
120  $fname = "./".$module_path."templates/".basename($a_tplname);
121  }
122  else
123  {
124  $fname = "./".$module_path."templates/default/".basename($a_tplname);
125  }
126  }
127  }
128  else
129  {
130  $fname = $a_tplname;
131  }
132 
133  return $fname;
134  }
const ILIAS_MODULE
Definition: payment.php:15
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ getTemplatePath() [2/2]

ilTemplate::getTemplatePath (   $a_tplname,
  $a_in_module = false,
  $a_plugin = false 
)

builds a full template path with template and module name

Parameters
string$a_tplnametemplate name
boolean$in_moduleshould be set to true, if template file is in module subdirectory
Returns
string full template path

Definition at line 1472 of file class.ilTemplate.php.

References $_GET, $ilCtrl, and ILIAS_MODULE.

Referenced by addBlockFile(), and ilTemplate().

1473  {
1474  global $ilias, $ilCtrl;
1475 
1476  $fname = "";
1477 
1478  // if baseClass functionality is used (ilias.php):
1479  // get template directory from ilCtrl
1480  if (!empty($_GET["baseClass"]) && $a_in_module === true)
1481  {
1482  $a_in_module = $ilCtrl->getModuleDir();
1483  }
1484 
1485  if (strpos($a_tplname,"/") === false)
1486  {
1487  $module_path = "";
1488 
1489  //$fname = $ilias->tplPath;
1490  if ($a_in_module)
1491  {
1492  if ($a_in_module === true)
1493  {
1494  $module_path = ILIAS_MODULE."/";
1495  }
1496  else
1497  {
1498  $module_path = $a_in_module."/";
1499  }
1500  }
1501 
1502  // use ilStyleDefinition instead of account to get the current skin
1503  include_once "Services/Style/classes/class.ilStyleDefinition.php";
1504  if (ilStyleDefinition::getCurrentSkin() != "default")
1505  {
1506  $fname = "./Customizing/global/skin/".
1507  ilStyleDefinition::getCurrentSkin()."/".$module_path.basename($a_tplname);
1508  }
1509 
1510  if($fname == "" || !file_exists($fname))
1511  {
1512  $fname = "./".$module_path."templates/default/".basename($a_tplname);
1513  }
1514  }
1515  else
1516  {
1517  $fname = $a_tplname;
1518  }
1519 
1520  return $fname;
1521  }
const ILIAS_MODULE
Definition: payment.php:15
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ getTitleColor()

ilTemplate::getTitleColor ( )

Get title color.

Returns
string color

Definition at line 1640 of file class.ilTemplate.php.

Referenced by fillHeader().

1641  {
1642  return $this->title_color;
1643  }
+ Here is the caller graph for this function:

◆ handleReferer()

ilTemplate::handleReferer ( )

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

Definition at line 1044 of file class.ilTemplate.php.

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

Referenced by get(), and show().

1045  {
1046  if (((substr(strrchr($_SERVER["PHP_SELF"],"/"),1) != "error.php")
1047  && (substr(strrchr($_SERVER["PHP_SELF"],"/"),1) != "adm_menu.php")
1048  && (substr(strrchr($_SERVER["PHP_SELF"],"/"),1) != "chat.php")))
1049  {
1050  $_SESSION["post_vars"] = $_POST;
1051 
1052  // referer is modified if query string contains cmd=gateway and $_POST is not empty.
1053  // this is a workaround to display formular again in case of error and if the referer points to another page
1054  $url_parts = @parse_url($_SERVER["REQUEST_URI"]);
1055  if(!$url_parts)
1056  {
1057  $protocol = (isset($_SERVER['HTTPS']) ? 'https' : 'http').'://';
1058  $host = $_SERVER['HTTP_HOST'];
1059  $path = $_SERVER['REQUEST_URI'];
1060  $url_parts = @parse_url($protocol.$host.$path);
1061  }
1062 
1063  if (isset($url_parts["query"]) && preg_match("/cmd=gateway/",$url_parts["query"]) && (isset($_POST["cmd"]["create"])))
1064  {
1065  foreach ($_POST as $key => $val)
1066  {
1067  if (is_array($val))
1068  {
1069  $val = key($val);
1070  }
1071 
1072  $str .= "&".$key."=".$val;
1073  }
1074 
1075  $_SESSION["referer"] = preg_replace("/cmd=gateway/",substr($str,1),$_SERVER["REQUEST_URI"]);
1076  $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1077 
1078  }
1079  else if (isset($url_parts["query"]) && preg_match("/cmd=post/",$url_parts["query"]) && (isset($_POST["cmd"]["create"])))
1080  {
1081  foreach ($_POST as $key => $val)
1082  {
1083  if (is_array($val))
1084  {
1085  $val = key($val);
1086  }
1087 
1088  $str .= "&".$key."=".$val;
1089  }
1090 
1091  $_SESSION["referer"] = preg_replace("/cmd=post/",substr($str,1),$_SERVER["REQUEST_URI"]);
1092  if (isset($_GET['ref_id']))
1093  {
1094  $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1095  }
1096  else
1097  {
1098  $_SESSION['referer_ref_id'] = 0;
1099  }
1100  }
1101  else
1102  {
1103  $_SESSION["referer"] = $_SERVER["REQUEST_URI"];
1104  if (isset($_GET['ref_id']))
1105  {
1106  $_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
1107  }
1108  else
1109  {
1110  $_SESSION['referer_ref_id'] = 0;
1111  }
1112  }
1113 
1114  unset($_SESSION["error_post_vars"]);
1115  }
1116  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
$path
Definition: index.php:22
+ Here is the caller graph for this function:

◆ hasMessage()

ilTemplate::hasMessage (   $a_type)

Definition at line 355 of file class.ilTemplate.php.

356  {
357  return (isset($this->message[$a_type]) && strlen($this->message[$a_type]));
358  }

◆ ilTemplate() [1/2]

ilTemplate::ilTemplate (   $file,
  $flag1,
  $flag2,
  $in_module = false,
  $vars = "DEFAULT" 
)

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 47 of file class.ilTemplate.php.

References $file, ilTemplateX\callConstructor(), getTemplatePath(), loadTemplatefile(), and HTML_Template_IT\setOption().

48  {
49  $this->activeBlock = "__global__";
50  $this->vars = array();
51 
52  $fname = $this->getTemplatePath($file, $in_module);
53 
54  $this->tplName = basename($fname);
55  $this->tplPath = dirname($fname);
56  // set default content-type to text/html
57  $this->contenttype = "text/html";
58  if (!file_exists($fname))
59  {
60  die("template ".$fname." was not found.");
61  return false;
62  }
63 
64  //$this->IntegratedTemplateExtension(dirname($fname));
65  $this->callConstructor();
66  //$this->loadTemplatefile(basename($fname), $flag1, $flag2);
67  $this->loadTemplatefile($fname, $flag1, $flag2);
68  //add tplPath to replacevars
69  $this->vars["TPLPATH"] = $this->tplPath;
70 
71  // set Options
72  if (method_exists($this, "setOption"))
73  {
74  $this->setOption('use_preg', false);
75  }
76 
77  return true;
78  }
getTemplatePath($a_tplname, $a_in_module=false, $a_plugin=false)
builds a full template path with template and module name
print $file
loadTemplatefile( $filename, $removeUnknownVariables=true, $removeEmptyBlocks=true)
Reads a template file from the disk.
setOption($option, $value)
Sets the option for the template class.
Definition: IT.php:397
+ Here is the call graph for this function:

◆ ilTemplate() [2/2]

ilTemplate::ilTemplate (   $file,
  $flag1,
  $flag2,
  $in_module = false,
  $vars = "DEFAULT",
  $plugin = false,
  $a_use_cache = false 
)

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 70 of file class.ilTemplate.php.

References $file, ilTemplateX\callConstructor(), getTemplateIdentifier(), getTemplatePath(), loadTemplatefile(), setBodyClass(), and HTML_Template_IT\setOption().

Referenced by addILIASFooter(), fillMessage(), and getMessageHTML().

72  {
73  global $ilias;
74 //echo "<br>-".$file."-";
75 
76  $this->activeBlock = "__global__";
77  $this->vars = array();
78  $this->addFooter = TRUE;
79 
80  $this->il_use_cache = $a_use_cache;
81  $this->il_cur_key = $file."/".$in_module;
82 
83  $fname = $this->getTemplatePath($file, $in_module, $plugin);
84 
85  $this->tplName = basename($fname);
86  $this->tplPath = dirname($fname);
87  // template identifier e.g. "Services/Calendar/tpl.minical.html"
88  $this->tplIdentifier = $this->getTemplateIdentifier($file, $in_module);
89 
90  // set default content-type to text/html
91  $this->contenttype = "text/html";
92  if (!file_exists($fname))
93  {
94  $ilias->raiseError("template ".$fname." was not found.", $ilias->error_obj->FATAL);
95  return false;
96  }
97 
98  //$this->IntegratedTemplateExtension(dirname($fname));
99  $this->callConstructor();
100  //$this->loadTemplatefile(basename($fname), $flag1, $flag2);
101  $this->loadTemplatefile($fname, $flag1, $flag2);
102  //add tplPath to replacevars
103  $this->vars["TPLPATH"] = $this->tplPath;
104 
105  // set Options
106  if (method_exists($this, "setOption"))
107  {
108  $this->setOption('use_preg', false);
109  }
110  $this->setBodyClass("std");
111 
112  return true;
113  }
getTemplatePath($a_tplname, $a_in_module=false, $a_plugin=false)
builds a full template path with template and module name
print $file
setBodyClass($a_class="")
getTemplateIdentifier($a_tplname, $a_in_module=false)
get a unique template identifier
loadTemplatefile( $filename, $removeUnknownVariables=true, $removeEmptyBlocks=true)
Reads a template file from the disk.
setOption($option, $value)
Sets the option for the template class.
Definition: IT.php:397
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ includeNavigation()

ilTemplate::includeNavigation ( )

check if there is a NAVIGATION-topic public

Returns
boolean

Definition at line 1336 of file class.ilTemplate.php.

References checkTopic().

1337  {
1338  return $this->checkTopic("__global__", "NAVIGATION");
1339  }
checkTopic($a_block, $a_topic)
checks for a topic in the template private
+ Here is the call graph for this function:

◆ includeTree()

ilTemplate::includeTree ( )

check if there is a TREE-topic public

Returns
boolean

Definition at line 1346 of file class.ilTemplate.php.

References checkTopic().

1347  {
1348  return $this->checkTopic("__global__", "TREE");
1349  }
checkTopic($a_block, $a_topic)
checks for a topic in the template private
+ Here is the call graph for this function:

◆ init()

ilTemplate::init ( )

Definition at line 134 of file class.ilTemplate.php.

References HTML_Template_IT\$blockdata, HTML_Template_IT\$blockinner, HTML_Template_IT\$blocklist, HTML_Template_IT\$blockvariables, HTML_Template_IT\$err, HTML_Template_IT\$flagBlocktrouble, HTML_Template_IT\buildBlockvariablelist(), HTML_Template_ITX\buildFunctionlist(), HTML_Template_IT\findBlocks(), and HTML_Template_IT\free().

135  {
136  $this->free();
137  $this->buildFunctionlist();
138 
139  $cache_hit = false;
140  if ($this->il_use_cache)
141  {
142  // cache hit
143  if (isset(self::$il_cache[$this->il_cur_key]) && is_array(self::$il_cache[$this->il_cur_key]))
144  {
145  $cache_hit = true;
146 //echo "cache hit";
147  $this->err = self::$il_cache[$this->il_cur_key]["err"];
148  $this->flagBlocktrouble = self::$il_cache[$this->il_cur_key]["flagBlocktrouble"];
149  $this->blocklist = self::$il_cache[$this->il_cur_key]["blocklist"];
150  $this->blockdata = self::$il_cache[$this->il_cur_key]["blockdata"];
151  $this->blockinner = self::$il_cache[$this->il_cur_key]["blockinner"];
152  $this->blockparents = self::$il_cache[$this->il_cur_key]["blockparents"];
153  $this->blockvariables = self::$il_cache[$this->il_cur_key]["blockvariables"];
154  }
155  }
156 
157  if (!$cache_hit)
158  {
159  $this->findBlocks($this->template);
160  $this->template = '';
161  $this->buildBlockvariablelist();
162  if ($this->il_use_cache)
163  {
164  self::$il_cache[$this->il_cur_key]["err"] = $this->err;
165  self::$il_cache[$this->il_cur_key]["flagBlocktrouble"] = $this->flagBlocktrouble;
166  self::$il_cache[$this->il_cur_key]["blocklist"] = $this->blocklist;
167  self::$il_cache[$this->il_cur_key]["blockdata"] = $this->blockdata;
168  self::$il_cache[$this->il_cur_key]["blockinner"] = $this->blockinner;
169  self::$il_cache[$this->il_cur_key]["blockparents"] = $this->blockparents;
170  self::$il_cache[$this->il_cur_key]["blockvariables"] = $this->blockvariables;
171  }
172  }
173 
174  // we don't need it any more
175  $this->template = '';
176 
177  } // end func init
free()
Clears all datafields of the object.
Definition: IT.php:710
buildBlockvariablelist()
Build a list of all variables within of a block.
Definition: IT.php:813
findBlocks($string)
Recusively builds a list of all blocks within the template.
Definition: IT.php:854
buildFunctionlist()
Builds a functionlist from the template.
Definition: ITX.php:623
+ Here is the call graph for this function:

◆ initHelp()

ilTemplate::initHelp ( )

Init help.

Parameters

Definition at line 844 of file class.ilTemplate.php.

References ilHelpGUI\initHelp().

Referenced by get(), and show().

845  {
846  include_once("./Services/Help/classes/class.ilHelpGUI.php");
847  ilHelpGUI::initHelp($this);
848  }
initHelp($a_tpl)
Render current help page.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadTemplatefile()

ilTemplate::loadTemplatefile (   $filename,
  $removeUnknownVariables = true,
  $removeEmptyBlocks = true 
)

Reads a template file from the disk.

overwrites IT:loadTemplateFile to include the template input hook

Parameters
stringname of the template file
boolhow to handle unknown variables.
boolhow to handle empty blocks. public
Returns
boolean false on failure, otherwise true
See also
$template, setTemplate(), $removeUnknownVariables, $removeEmptyBlocks

Definition at line 1422 of file class.ilTemplate.php.

References $filename, HTML_Template_IT\$removeEmptyBlocks, HTML_Template_IT\$removeUnknownVariables, HTML_Template_IT\$template, HTML_Template_IT\getFile(), ilPluginAdmin\getPluginObject(), IL_COMP_SERVICE, ilUIHookPluginGUI\KEEP, and HTML_Template_IT\setTemplate().

Referenced by ilTemplate().

1425  {
1426  // copied from IT:loadTemplateFile
1427  $template = '';
1428  if (!$this->flagCacheTemplatefile ||
1429  $this->lastTemplatefile != $filename
1430  ) {
1431  $template = $this->getFile($filename);
1432  }
1433  $this->lastTemplatefile = $filename;
1434  // copied.
1435 
1436  // new code to include the template input hook:
1437  global $ilPluginAdmin;
1438  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
1439  foreach ($pl_names as $pl)
1440  {
1441  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
1442  $gui_class = $ui_plugin->getUIClassInstance();
1443 
1444  $resp = $gui_class->getHTML("", "template_load",
1445  array("tpl_id" => $this->tplIdentifier, "tpl_obj" => $this, "html" => $template));
1446 
1447  if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
1448  {
1449  $template = $gui_class->modifyHTML($template, $resp);
1450  }
1451  }
1452  // new.
1453 
1454  // copied from IT:loadTemplateFile
1455  return $template != '' ?
1456  $this->setTemplate(
1458  ) : false;
1459  // copied.
1460 
1461  }
$removeUnknownVariables
Definition: IT.php:195
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
$filename
Definition: buildRTE.php:89
$removeEmptyBlocks
Definition: IT.php:202
setTemplate( $template, $removeUnknownVariables=true, $removeEmptyBlocks=true)
Sets the template.
Definition: IT.php:737
const IL_COMP_SERVICE
getFile($filename)
Reads a file from disk and returns its content.
Definition: IT.php:906
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseCurrentBlock() [1/2]

ilTemplate::parseCurrentBlock (   $part = "DEFAULT")

Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public.

Parameters
string
Returns
string

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

References $activeBlock.

319  {
320  // Hier erst noch ein replace aufrufen
321  if ($part != "DEFAULT")
322  {
323  $tmp = $this->activeBlock;
324  $this->activeBlock = $part;
325  }
326 
327  if ($part != "DEFAULT")
328  {
329  $this->activeBlock = $tmp;
330  }
331 
332  //$this->fillVars();
333 
334  $this->activeBlock = "__global__";
335 
336  if ($part == "DEFAULT")
337  {
338  return parent::parseCurrentBlock();
339  }
340  else
341  {
342  return parent::parseCurrentBlock($part);
343  }
344  }

◆ parseCurrentBlock() [2/2]

ilTemplate::parseCurrentBlock (   $part = "DEFAULT")

Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public.

Parameters
string
Returns
string

Definition at line 1206 of file class.ilTemplate.php.

References $activeBlock, and fillVars().

Referenced by ilContainerRenderer\addHeaderRow(), ilContainerRenderer\addSeparatorRow(), ilContainerRenderer\addStandardRow(), ilChatroomViewTask\cancelJoin(), ilTermsOfServiceSignedDocumentFormElementGUI\checkInput(), ilForumExportGUI\executeCommand(), ilEMailInputGUI\insert(), ilCaptchaInputGUI\insert(), ilClozeGapInputBuilderGUI\insert(), ilAssQuestionPreviewGUI\populateGenericQuestionFeedback(), ilAssQuestionPreviewGUI\populateSolutionOutput(), ilAssQuestionPreviewGUI\populateSpecificQuestionFeedback(), ilContainerRenderer\renderDetails(), ilSurveyPageGUI\renderPageNode(), and ilContainerRenderer\renderSelectAllBlock().

1207  {
1208  // Hier erst noch ein replace aufrufen
1209  if ($part != "DEFAULT")
1210  {
1211  $tmp = $this->activeBlock;
1212  $this->activeBlock = $part;
1213  }
1214 
1215  if ($part != "DEFAULT")
1216  {
1217  $this->activeBlock = $tmp;
1218  }
1219 
1220  $this->fillVars();
1221 
1222  $this->activeBlock = "__global__";
1223 
1224  if ($part == "DEFAULT")
1225  {
1226  return parent::parseCurrentBlock();
1227  }
1228  else
1229  {
1230  return parent::parseCurrentBlock($part);
1231  }
1232  }
fillVars()
all template vars defined in $vars will be replaced automatically without setting and parsing them wi...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareForFormular()

ilTemplate::prepareForFormular (   $vars)

Wird angewendet, wenn die Daten in ein Formular replaced werden sollen, Dann wird erst noch ein htmlspecialchars drumherum gemacht.

public

Parameters
string

Definition at line 1278 of file class.ilTemplate.php.

1279  {
1280  if (!is_array($vars))
1281  {
1282  return;
1283  }
1284 
1285  reset($vars);
1286 
1287  while (list($i) = each($vars))
1288  {
1289  $vars[$i] = stripslashes($vars[$i]);
1290  $vars[$i] = htmlspecialchars($vars[$i]);
1291  }
1292 
1293  return($vars);
1294  }

◆ replace()

ilTemplate::replace ( )

??? public

Definition at line 1300 of file class.ilTemplate.php.

References HTML_Template_IT\setVariable().

Referenced by replaceDefault(), and replaceFromDatabase().

1301  {
1302  reset($this->vars);
1303 
1304  while(list($key, $val) = each($this->vars))
1305  {
1306  $this->setVariable($key, $val);
1307  }
1308  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ replaceDefault()

ilTemplate::replaceDefault ( )

??? public

Definition at line 1314 of file class.ilTemplate.php.

References replace().

1315  {
1316  $this->replace($this->vars);
1317  }
replace()
??? public
+ Here is the call graph for this function:

◆ replaceFromDatabase()

ilTemplate::replaceFromDatabase ( $DB,
  $block,
  $conv,
  $select = "default" 
)

??? TODO: Adjust var names to ilias.

This method wasn't used so far and isn't translated yet public

Parameters
string
string
string
string

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

References $res, $result, HTML_Template_IT\parseCurrentBlock(), replace(), and setCurrentBlock().

1245  {
1246  $res = $DB->selectDbAll();
1247 
1248  while ($DB->getDbNextElement($res))
1249  {
1250  $this->setCurrentBlock($block);
1251  $result = array();
1252  reset($conv);
1253 
1254  while (list ($key,$val) = each ($conv))
1255  {
1256  $result[$val]=$DB->element->data[$key];
1257  }
1258 
1259  if (($select != "default")
1260  && ($DB->element->data[$select["id"]]==$select["value"]
1261  || (strtolower($select["text"]) == "checked"
1262  && strpos( ",,".$select["value"].",," , ",".$DB->element->data[$select["id"]]."," )!=false)))
1263  {
1264  $result[$select["field"]] = $select["text"];
1265  }
1266 
1267  $this->replace($result);
1268  $this->parseCurrentBlock($block);
1269  }
1270  }
$result
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
replace()
??? public
+ Here is the call graph for this function:

◆ resetCss()

ilTemplate::resetCss ( )

Reset css files.

Parameters

Definition at line 2226 of file class.ilTemplate.php.

2227  {
2228  $this->css_files = array();
2229  }

◆ resetHeaderBlock()

ilTemplate::resetHeaderBlock (   $a_reset_header_action = true)

Set variable.

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

Definition at line 2565 of file class.ilTemplate.php.

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

2566  {
2567  $this->setTitle(null);
2568  $this->setTitleIcon(null);
2569  $this->setDescription(null);
2570  $this->setAlertProperties(array());
2571  $this->enableDragDropFileUpload(null);
2572 
2573  // see setFullscreenHeader()
2574  if($a_reset_header_action)
2575  {
2576  $this->setHeaderActionMenu(null);
2577  }
2578  }
setTitleIcon($a_icon_path, $a_icon_desc="")
set title icon
setDescription($a_descr)
sets title in standard template
setAlertProperties(array $a_props)
Set alert properties.
setTitle($a_title)
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()

ilTemplate::resetJavascript ( )

Reset javascript files.

Definition at line 2213 of file class.ilTemplate.php.

2214  {
2215  $this->js_files = array();
2216  $this->js_files_vp = array();
2217  $this->js_files_batch = array();
2218  }

◆ setAddFooter()

ilTemplate::setAddFooter (   $value)

Definition at line 184 of file class.ilTemplate.php.

185  {
186  $this->addFooter = $value;
187  }

◆ setAlertProperties()

ilTemplate::setAlertProperties ( array  $a_props)

Set alert properties.

Parameters
array$a_props
Returns
void

Definition at line 1650 of file class.ilTemplate.php.

Referenced by clearHeader(), and resetHeaderBlock().

1651  {
1652  $this->title_alerts = $a_props;
1653  }
+ Here is the caller graph for this function:

◆ setBackgroundColor()

ilTemplate::setBackgroundColor (   $a_bg_color)

Definition at line 2474 of file class.ilTemplate.php.

References HTML_Template_IT\setVariable().

2475  {
2476  // :TODO: currently inactive, JF should discuss this
2477  return;
2478 
2479  if($a_bg_color != "")
2480  {
2481  $this->setVariable("FRAME_BG_COLOR", " style=\"background-color: #".$a_bg_color."\"");
2482  }
2483  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:

◆ setBanner()

ilTemplate::setBanner (   $a_img,
  $a_width = 1370,
  $a_height = 100,
  $a_export = false 
)

Set banner.

Parameters
string$a_imgbanner full path (background image)
int$a_widthbanner width
int$a_heightbanner height
bool$a_export

Definition at line 2493 of file class.ilTemplate.php.

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

2494  {
2495  if($a_img)
2496  {
2497  if(!$a_export)
2498  {
2499  $a_img = ILIAS_HTTP_PATH."/".$a_img;
2500  }
2501 
2502  $this->setCurrentBlock("banner_bl");
2503  $this->setVariable("BANNER_WIDTH", $a_width); // currently not needed
2504  $this->setVariable("BANNER_HEIGHT", $a_height);
2505  $this->setVariable("BANNER_URL", $a_img);
2506  $this->parseCurrentBlock();
2507  }
2508  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:

◆ setBodyClass()

ilTemplate::setBodyClass (   $a_class = "")

Definition at line 1772 of file class.ilTemplate.php.

Referenced by ilTemplate().

1773  {
1774  $this->body_class = $a_class;
1775  }
+ Here is the caller graph for this function:

◆ setCenterColumnClass()

ilTemplate::setCenterColumnClass ( )
private

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

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

Referenced by get(), and show().

1884  {
1885  if (!$this->blockExists("center_col_width"))
1886  {
1887  return;
1888  }
1889  $center_column_class = "";
1890  if (trim($this->right_content) != "" && trim($this->left_content) != "") {
1891  $center_column_class = "two_side_col";
1892  }
1893  else if (trim($this->right_content) != "" || trim($this->left_content) != "") {
1894  $center_column_class = "one_side_col";
1895  }
1896 
1897  switch ($center_column_class)
1898  {
1899  case "one_side_col": $center_column_class = "col-sm-9"; break;
1900  case "two_side_col": $center_column_class = "col-sm-6"; break;
1901  default: $center_column_class = "col-sm-12"; break;
1902  }
1903  if (trim($this->left_content) != "")
1904  {
1905  $center_column_class.= " col-sm-push-3";
1906  }
1907 
1908  $this->setCurrentBlock("center_col_width");
1909  $this->setVariable("CENTER_COL", $center_column_class);
1910  $this->parseCurrentBlock();
1911  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
blockExists($a_blockname)
check if block exists in actual template private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setContent()

ilTemplate::setContent (   $a_html)

sets content for standard template

Definition at line 1843 of file class.ilTemplate.php.

1844  {
1845  if ($a_html != "")
1846  {
1847  $this->main_content = $a_html;
1848  }
1849  }

◆ setContentStyleSheet()

ilTemplate::setContentStyleSheet (   $a_style)

Set content style (used for page content editor)

Definition at line 786 of file class.ilTemplate.php.

787  {
788  $this->content_style_sheet = $a_style;
789  }

◆ setContentType()

ilTemplate::setContentType (   $a_content_type = "text/html")

Set the content type for the template output.

Set the content type for the template output Usually this is text/html. For MathML output the content type should be set to text/xml

Parameters
string$a_content_typeContent type public

Definition at line 447 of file class.ilTemplate.php.

448  {
449  $this->contenttype = $a_content_type;
450  }

◆ setCurrentBlock() [1/2]

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

Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.

public

Parameters
string
Returns
???

Definition at line 280 of file class.ilTemplate.php.

281  {
282  $this->activeBlock = $part;
283 
284  if ($part == "DEFAULT")
285  {
286  return parent::setCurrentBlock();
287  }
288  else
289  {
290  return parent::setCurrentBlock($part);
291  }
292  }

◆ setCurrentBlock() [2/2]

◆ setDescription()

ilTemplate::setDescription (   $a_descr)

sets title in standard template

Definition at line 1795 of file class.ilTemplate.php.

Referenced by clearHeader(), and resetHeaderBlock().

1796  {
1797  $this->title_desc = $a_descr;
1798 // $this->setVariable("H_DESCRIPTION", $a_descr);
1799  }
+ Here is the caller graph for this function:

◆ setEditPageButton()

ilTemplate::setEditPageButton (   $a_link,
  $a_txt,
  $a_frame 
)

Show admin view button.

Definition at line 2300 of file class.ilTemplate.php.

2301  {
2302  $this->edit_page_button =
2303  array("link" => $a_link, "txt" => $a_txt, "frame" => $a_frame);
2304  }

◆ setHeaderActionMenu()

ilTemplate::setHeaderActionMenu (   $a_header)

Set header action menu.

Parameters
string$a_gui$a_header

Definition at line 1825 of file class.ilTemplate.php.

Referenced by resetHeaderBlock().

1826  {
1827  $this->header_action = $a_header;
1828  }
+ Here is the caller graph for this function:

◆ setHeaderPageTitle()

ilTemplate::setHeaderPageTitle (   $a_title)

Definition at line 1574 of file class.ilTemplate.php.

References ilUtil\stripScriptHTML().

1575  {
1576  $a_title = ilUtil::stripScriptHTML($a_title);
1577  $this->header_page_title = $a_title;
1578  }
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...
+ Here is the call graph for this function:

◆ setLeftContent()

ilTemplate::setLeftContent (   $a_html)

sets content of left column

Definition at line 1916 of file class.ilTemplate.php.

1917  {
1918  $this->left_content = $a_html;
1919  }

◆ setLeftNavContent()

ilTemplate::setLeftNavContent (   $a_content)

Sets content of left navigation column.

Definition at line 1941 of file class.ilTemplate.php.

1942  {
1943  $this->left_nav_content = $a_content;
1944  }

◆ setLocator()

ilTemplate::setLocator ( )

Insert locator.

Definition at line 1963 of file class.ilTemplate.php.

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

1964  {
1965  global $ilLocator, $lng, $ilPluginAdmin, $ilMainMenu;
1966 
1967  // blog/portfolio
1968  if($ilMainMenu->getMode() == ilMainMenuGUI::MODE_TOPBAR_REDUCED ||
1969  $ilMainMenu->getMode() == ilMainMenuGUI::MODE_TOPBAR_ONLY)
1970  {
1971  $this->setVariable("LOCATOR", "");
1972  return;
1973  }
1974 
1975  $html = "";
1976  if (is_object($ilPluginAdmin))
1977  {
1978  include_once("./Services/UIComponent/classes/class.ilUIHookProcessor.php");
1979  $uip = new ilUIHookProcessor("Services/Locator", "main_locator",
1980  array("locator_gui" => $ilLocator));
1981  if (!$uip->replaced())
1982  {
1983  $html = $ilLocator->getHTML();
1984  }
1985  $html = $uip->getHTML($html);
1986  }
1987  else
1988  {
1989  $html = $ilLocator->getHTML();
1990  }
1991 
1992  $this->setVariable("LOCATOR", $html);
1993  }
UI interface hook processor.
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ setLoginTargetPar()

ilTemplate::setLoginTargetPar (   $a_val)

Set target parameter for login (public sector).

This is used by the main menu

Definition at line 2033 of file class.ilTemplate.php.

2034  {
2035  $this->login_target_par = $a_val;
2036  }

◆ setMessage() [1/2]

ilTemplate::setMessage (   $a_type,
  $a_txt,
  $a_keep = false 
)

Set message.

Please use ilUtil::sendInfo(), ilUtil::sendSuccess() and ilUtil::sendFailure()

Definition at line 335 of file class.ilTemplate.php.

References $_SESSION.

336  {
337  if (!in_array($a_type, array("info", "success", "failure", "question")) || $a_txt == "")
338  {
339  return;
340  }
341  if ($a_type == "question")
342  {
343  $a_type = "mess_question";
344  }
345  if (!$a_keep)
346  {
347  $this->message[$a_type] = $a_txt;
348  }
349  else
350  {
351  $_SESSION[$a_type] = $a_txt;
352  }
353  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']

◆ setMessage() [2/2]

ilTemplate::setMessage (   $a_type,
  $a_txt,
  $a_keep = false 
)

Set message.

Please use ilUtil::sendInfo(), ilUtil::sendSuccess() and ilUtil::sendFailure()

Definition at line 349 of file class.ilTemplate.php.

References ilSession\set().

350  {
351  if (!in_array($a_type, array("info", "success", "failure", "question")) || $a_txt == "")
352  {
353  return;
354  }
355  if ($a_type == "question")
356  {
357  $a_type = "mess_question";
358  }
359  if (!$a_keep)
360  {
361  $this->message[$a_type] = $a_txt;
362  }
363  else
364  {
365  ilSession::set($a_type, $a_txt);
366  }
367  }
static set($a_var, $a_val)
Set a value.
+ Here is the call graph for this function:

◆ setMountWebfolderIcon()

ilTemplate::setMountWebfolderIcon (   $a_ref_id)

shows icon for mounting a webfolder

Definition at line 2162 of file class.ilTemplate.php.

References $lng.

2163  {
2164  global $lng;
2165 
2166  $this->mount_webfolder = $a_ref_id;
2167  }
global $lng
Definition: privfeed.php:40

◆ setNewContentStyleSheetLocation()

ilTemplate::setNewContentStyleSheetLocation (   $a_stylesheet)

Definition at line 1585 of file class.ilTemplate.php.

References HTML_Template_IT\setVariable().

1586  {
1587  $this->setVariable("LOCATION_NEWCONTENT_STYLESHEET", $a_stylesheet);
1588  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:

◆ setPageActions()

ilTemplate::setPageActions (   $a_page_actions_html)

Show admin view button.

Definition at line 2292 of file class.ilTemplate.php.

2293  {
2294  $this->page_actions = $a_page_actions_html;
2295  }

◆ setPageFormAction()

ilTemplate::setPageFormAction (   $a_action)

Definition at line 1787 of file class.ilTemplate.php.

1788  {
1789  $this->page_form_action = $a_action;
1790  }

◆ setPermanentLink()

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

Definition at line 2400 of file class.ilTemplate.php.

2401  {
2402  $this->permanent_link = array(
2403  "type" => $a_type,
2404  "id" => $a_id,
2405  "append" => $a_append,
2406  "target" => $a_target);
2407  }

◆ setRightContent()

ilTemplate::setRightContent (   $a_html)

sets content of right column

Definition at line 1865 of file class.ilTemplate.php.

1866  {
1867  $this->right_content = $a_html;
1868  }

◆ setStyleSheetLocation()

ilTemplate::setStyleSheetLocation (   $a_stylesheet)

Definition at line 1580 of file class.ilTemplate.php.

References HTML_Template_IT\setVariable().

1581  {
1582  $this->setVariable("LOCATION_STYLESHEET", $a_stylesheet);
1583  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:

◆ setSubTabs()

ilTemplate::setSubTabs (   $a_tabs_html)

sets subtabs in standard template

Definition at line 2013 of file class.ilTemplate.php.

References HTML_Template_IT\setVariable().

2014  {
2015  $this->setVariable("SUB_TABS", $a_tabs_html);
2016  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
+ Here is the call graph for this function:

◆ setTabs()

ilTemplate::setTabs (   $a_tabs_html)

sets tabs in standard template

Definition at line 1998 of file class.ilTemplate.php.

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

1999  {
2000  if ($a_tabs_html != "" && $this->blockExists("tabs_outer_start"))
2001  {
2002  $this->touchBlock("tabs_outer_start");
2003  $this->touchBlock("tabs_outer_end");
2004  $this->touchBlock("tabs_inner_start");
2005  $this->touchBlock("tabs_inner_end");
2006  $this->setVariable("TABS", $a_tabs_html);
2007  }
2008  }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
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()

ilTemplate::setTitle (   $a_title)

sets title in standard template

Definition at line 1611 of file class.ilTemplate.php.

References ilUtil\stripScriptHTML().

Referenced by clearHeader(), and resetHeaderBlock().

1612  {
1613  $this->title = ilUtil::stripScriptHTML($a_title);
1614  $this->header_page_title = $a_title;
1615  }
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...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTitleColor()

ilTemplate::setTitleColor (   $a_val)

Set title color.

Parameters
string$a_valcolor

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

1631  {
1632  $this->title_color = $a_val;
1633  }

◆ setTitleIcon()

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

set title icon

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

Referenced by clearHeader(), and resetHeaderBlock().

1767  {
1768  $this->icon_desc = $a_icon_desc;
1769  $this->icon_path = $a_icon_path;
1770  }
+ Here is the caller graph for this function:

◆ setTitleUrl()

ilTemplate::setTitleUrl (   $a_url)

sets title url in standard template

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

1621  {
1622  $this->title_url = $a_url;
1623  }

◆ setTreeFlatIcon()

ilTemplate::setTreeFlatIcon (   $a_link,
  $a_mode 
)

set tree/flat icon

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

Definition at line 2175 of file class.ilTemplate.php.

References $lng.

2176  {
2177  global $lng;
2178 
2179  $this->tree_flat_link = $a_link;
2180  $this->tree_flat_mode = $a_mode;
2181  }
global $lng
Definition: privfeed.php:40

◆ setUpperIcon()

ilTemplate::setUpperIcon (   $a_link,
  $a_frame = "" 
)

sets icon to upper level

Definition at line 2021 of file class.ilTemplate.php.

References $lng.

2022  {
2023  global $lng;
2024 
2025  $this->upper_icon = $a_link;
2026  $this->upper_icon_frame = $a_frame;
2027  }
global $lng
Definition: privfeed.php:40

◆ show() [1/2]

ilTemplate::show (   $part = "DEFAULT")

public

Parameters
string

Definition at line 157 of file class.ilTemplate.php.

References $_GET, $_POST, $out, $path, $txt, blockExists(), ilSession\clear(), fillCssFiles(), fillJavaScriptFiles(), ilSession\get(), getMessageHTML(), ilSession\set(), and HTML_Template_IT\setVariable().

158  {
159  header('Content-type: text/html; charset=UTF-8');
160 
161  $this->fillJavaScriptFiles();
162  $this->fillCssFiles();
163 
164  // ERROR HANDLER SETS $_GET["message"] IN CASE OF $error_obj->MESSAGE
165  $ms = array("info", "success", "failure", "question");
166  $out = "";
167 
168  foreach ($ms as $m)
169  {
170  if ($m == "question")
171  {
172  $m = "mess_question";
173  }
174 
175  $txt = (ilSession::get($m) != "")
176  ? ilSession::get($m)
177  : $this->message[$m];
178 
179  if ($m == "mess_question")
180  {
181  $m = "question";
182  }
183 
184  if ($txt != "")
185  {
186  $out.= $this->getMessageHTML($txt, $m);
187  }
188 
189  if ($m == "question")
190  {
191  $m = "mess_question";
192  }
193 
194  if (ilSession::get($m))
195  {
196  ilSession::clear($m);
197  }
198  }
199 
200  if ($this->blockExists("MESSAGE") && $out != "")
201  {
202  $this->setVariable("MESSAGE", $out);
203  }
204 
205  if ($part == "DEFAULT")
206  {
207  parent::show();
208  }
209  else
210  {
211  parent::show($part);
212  }
213 
214  if (((substr(strrchr($_SERVER["PHP_SELF"],"/"),1) != "error.php")
215  && (substr(strrchr($_SERVER["PHP_SELF"],"/"),1) != "adm_menu.php")))
216  {
217  ilSession::set("post_vars", $_POST);
218 
219  // referer is modified if query string contains cmd=gateway and $_POST is not empty.
220  // this is a workaround to display formular again in case of error and if the referer points to another page
221  $url_parts = parse_url($_SERVER["REQUEST_URI"]);
222  if(!$url_parts)
223  {
224  $protocol = (isset($_SERVER['HTTPS']) ? 'https' : 'http').'://';
225  $host = $_SERVER['HTTP_HOST'];
226  $path = $_SERVER['REQUEST_URI'];
227  $url_parts = @parse_url($protocol.$host.$path);
228  }
229 
230  if (preg_match("/cmd=gateway/",$url_parts["query"]))
231  {
232  foreach ($_POST as $key => $val)
233  {
234  if (is_array($val))
235  {
236  $val = key($val);
237  }
238 
239  $str .= "&".$key."=".$val;
240  }
241 
242  ilSession::set("referer",
243  preg_replace("/cmd=gateway/",substr($str,1),$_SERVER["REQUEST_URI"]));
244  ilSession::set("referer_ref_id",
245  (int) $_GET['ref_id']);
246  }
247  else
248  {
249  ilSession::set("referer", $_SERVER["REQUEST_URI"]);
250  ilSession::set("referer_ref_id",
251  (int) $_GET['ref_id']);
252  }
253 
254  ilSession::clear("error_post_vars");
255  }
256  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
static get($a_var)
Get a value.
static set($a_var, $a_val)
Set a value.
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:626
static clear($a_var)
Unset a value.
$txt
Definition: error.php:10
getMessageHTML($a_txt, $a_type="info")
Get HTML for a system message.
fillCssFiles($a_force=false)
Fill in the css file tags.
blockExists($a_blockname)
check if block exists in actual template private
$path
Definition: index.php:22
+ Here is the call graph for this function:

◆ show() [2/2]

ilTemplate::show (   $part = "DEFAULT",
  $a_fill_tabs = true,
  $a_skip_main_menu = false 
)

public

Parameters
string
boolfill template variable {TABS} with content of ilTabs

Definition at line 457 of file class.ilTemplate.php.

References $tpl, ilObjLanguageAccess\_saveUsages(), addILIASFooter(), blockExists(), fillAdminPanel(), fillBodyClass(), fillContentLanguage(), fillContentStyle(), fillCssFiles(), fillHeader(), fillInlineCss(), fillJavaScriptFiles(), fillLeftContent(), fillLeftNav(), fillLightbox(), fillMainContent(), fillMainMenu(), fillMessage(), fillNewContentStyle(), fillOnLoadCode(), fillPermanentLink(), fillRightContent(), fillScreenReaderFocus(), fillSideIcons(), fillStopFloating(), fillTabs(), fillToolbar(), fillWindowTitle(), getContentType(), getMainMenu(), ilPluginAdmin\getPluginObject(), getTabsHTML(), handleReferer(), IL_COMP_SERVICE, ilYuiUtil\initDom(), initHelp(), ilUIHookPluginGUI\KEEP, HTML_Template_IT\parseCurrentBlock(), setCenterColumnClass(), setCurrentBlock(), and variableExists().

458  {
459  global $ilias, $ilTabs;
460 
461  // include yahoo dom per default
462  include_once("./Services/YUI/classes/class.ilYuiUtil.php");
464 
465 //echo "-".ilUtil::getP3PLocation()."-";
466  //header('P3P: policyref="'.ilUtil::getP3PLocation().
467  // '", CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"');
468  header('P3P: CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"');
469  header("Content-type: " . $this->getContentType() . "; charset=UTF-8");
470 
471  $this->fillMessage();
472 
473  // display ILIAS footer
474  if ($part !== false)
475  {
476  $this->addILIASFooter();
477  }
478 
479  // set standard parts (tabs and title icon)
480  $this->fillBodyClass();
481  if ($a_fill_tabs)
482  {
483  if ($this->blockExists("content"))
484  {
485  // determine default screen id
486  $this->getTabsHTML();
487  }
488 
489  // to get also the js files for the main menu
490  if (!$a_skip_main_menu)
491  {
492  $this->getMainMenu();
493  $this->initHelp();
494  }
495 
496  if($this->blockExists("content") && $this->variableExists('MAINMENU'))
497  {
498  global $tpl;
499 
500  include_once 'Services/Authentication/classes/class.ilSessionReminderGUI.php';
501  $session_reminder_gui = new ilSessionReminderGUI(ilSessionReminder::createInstanceWithCurrentUserSession());
502  $tpl->setVariable('SESSION_REMINDER', $session_reminder_gui->getHtml());
503  }
504 
505  // these fill blocks in tpl.main.html
506  $this->fillCssFiles();
507  $this->fillInlineCss();
508  //$this->fillJavaScriptFiles();
509  $this->fillContentStyle();
510 
511  // these fill just plain placeholder variables in tpl.main.html
512  $this->setCurrentBlock("DEFAULT");
513  $this->fillNewContentStyle();
514  $this->fillContentLanguage();
515  $this->fillWindowTitle();
516 
517  // these fill blocks in tpl.adm_content.html
518  $this->fillHeader();
519  $this->fillSideIcons();
520  $this->fillScreenReaderFocus();
521  $this->fillStopFloating();
522  $this->fillLeftContent();
523  $this->fillLeftNav();
524  $this->fillRightContent();
525  $this->fillAdminPanel();
526  $this->fillToolbar();
527  $this->fillPermanentLink();
528 
529  $this->setCenterColumnClass();
530 
531  // late loading of javascipr files, since operations above may add files
532  $this->fillJavaScriptFiles();
533  $this->fillOnLoadCode();
534 
535  // these fill just plain placeholder variables in tpl.adm_content.html
536  // these fill just plain placeholder variables in tpl.adm_content.html
537  if ($this->blockExists("content"))
538  {
539  $this->setCurrentBlock("content");
540  $this->fillTabs();
541  $this->fillMainContent();
542  $this->fillMainMenu();
543  $this->fillLightbox();
544  $this->parseCurrentBlock();
545  }
546  }
547 
548  if ($part == "DEFAULT" or is_bool($part))
549  {
550  $html = parent::get();
551  }
552  else
553  {
554  $html = parent::get($part);
555  }
556 
557  // include the template output hook
558  global $ilPluginAdmin;
559  $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
560  foreach ($pl_names as $pl)
561  {
562  $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
563  $gui_class = $ui_plugin->getUIClassInstance();
564 
565  $resp = $gui_class->getHTML("", "template_show",
566  array("tpl_id" => $this->tplIdentifier, "tpl_obj" => $this, "html" => $html));
567 
568  if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
569  {
570  $html = $gui_class->modifyHTML($html, $resp);
571  }
572  }
573 
574  // fix #9992: save language usages as late as possible
575  if ($this->translation_linked)
576  {
578  }
579 
580  print $html;
581 
582  $this->handleReferer();
583  }
fillNewContentStyle()
Fill Content Style.
fillScreenReaderFocus()
Accessibility focus for screen readers.
getTabsHTML()
Get tabs HTML.
fillPermanentLink()
Fill in permanent link.
fillLeftContent()
Fill left content.
fillOnLoadCode()
Fill add on load code.
fillStopFloating()
stop floating
fillHeader()
Fill header.
fillAdminPanel()
Put admin panel into template:
fillSideIcons()
Fill side icons (upper icon, tree icon, webfolder icon)
global $tpl
Definition: ilias.php:8
static initDom()
Init YUI Dom.
fillLeftNav()
Fill left navigation frame.
initHelp()
Init help.
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
fillLightbox()
Fill lightbox content.
fillRightContent()
Fill right content.
fillContentLanguage()
Add current user language to meta tags.
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
handleReferer()
TODO: this is nice, but shouldn&#39;t be done here (-> maybe at the end of ilias.php!?, alex)
getContentType()
Get the content type for the template output.
fillCssFiles($a_force=false)
Fill in the css file tags.
blockExists($a_blockname)
check if block exists in actual template private
fillMainContent()
Fill main content.
static _saveUsages()
Store the collected usages in the user session.
fillContentStyle()
Fill Content Style.
fillInlineCss()
Fill in the inline css.
variableExists($a_variablename)
addILIASFooter()
add ILIAS footer
const IL_COMP_SERVICE
+ Here is the call graph for this function:

◆ stopTitleFloating()

ilTemplate::stopTitleFloating ( )

set stop floating (if no tabs are used)

Definition at line 1804 of file class.ilTemplate.php.

1805  {
1806  $this->stop_floating = true;
1807  }

◆ touchBlock() [1/2]

ilTemplate::touchBlock (   $block)

overwrites ITX::touchBlock.

public

Parameters
string
Returns
???

Definition at line 300 of file class.ilTemplate.php.

References HTML_Template_IT\parseCurrentBlock(), and setCurrentBlock().

301  {
302  $this->setCurrentBlock($block);
303  //$count = $this->fillVars();
304  $this->parseCurrentBlock();
305 
306  if ($count == 0)
307  {
308  parent::touchBlock($block);
309  }
310  }
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
+ Here is the call graph for this function:

◆ touchBlock() [2/2]

ilTemplate::touchBlock (   $block)

overwrites ITX::touchBlock.

public

Parameters
string
Returns
???

Definition at line 1188 of file class.ilTemplate.php.

References fillVars(), HTML_Template_IT\parseCurrentBlock(), and setCurrentBlock().

Referenced by ilContainerRenderer\addHeaderRow(), ilContainerRenderer\addStandardRow(), fillHeader(), fillLeftNav(), fillPageFormAction(), fillScreenReaderFocus(), fillSideIcons(), fillStopFloating(), fillTabs(), ilSurveyPageGUI\renderPageNode(), and setTabs().

1189  {
1190  $this->setCurrentBlock($block);
1191  $count = $this->fillVars();
1192  $this->parseCurrentBlock();
1193 
1194  if ($count == 0)
1195  {
1196  parent::touchBlock($block);
1197  }
1198  }
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
parseCurrentBlock()
Parses the current block.
Definition: IT.php:607
fillVars()
all template vars defined in $vars will be replaced automatically without setting and parsing them wi...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ variableExists()

ilTemplate::variableExists (   $a_variablename)
private

Definition at line 1130 of file class.ilTemplate.php.

Referenced by fillMainMenu(), getMainMenu(), and show().

1131  {
1132  return (isset($this->blockvariables["content"][$a_variablename]) ? true : false);
1133  }
+ Here is the caller graph for this function:

Field Documentation

◆ $activeBlock

ilTemplate::$activeBlock

Definition at line 30 of file class.ilTemplate.php.

Referenced by parseCurrentBlock().

◆ $addFooter

ilTemplate::$addFooter
private

Definition at line 39 of file class.ilTemplate.php.

Referenced by getAddFooter().

◆ $admin_panel_commands

ilTemplate::$admin_panel_commands = array()

Definition at line 37 of file class.ilTemplate.php.

◆ $content_style_sheet

ilTemplate::$content_style_sheet = ""
protected

Definition at line 53 of file class.ilTemplate.php.

◆ $contenttype

ilTemplate::$contenttype

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

Referenced by getContentType().

◆ $css_files

ilTemplate::$css_files = array()

Definition at line 35 of file class.ilTemplate.php.

◆ $header_action

ilTemplate::$header_action
protected

Definition at line 56 of file class.ilTemplate.php.

Referenced by getHeaderActionMenu().

◆ $il_cache

ilTemplate::$il_cache = array()
staticprotected

Definition at line 41 of file class.ilTemplate.php.

◆ $inline_css

ilTemplate::$inline_css = array()

Definition at line 36 of file class.ilTemplate.php.

◆ $js_files

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

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

◆ $js_files_batch

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

Definition at line 34 of file class.ilTemplate.php.

◆ $js_files_vp

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

Definition at line 33 of file class.ilTemplate.php.

◆ $lightbox

ilTemplate::$lightbox = array()
protected

Definition at line 57 of file class.ilTemplate.php.

◆ $message

ilTemplate::$message = ""
protected

Definition at line 42 of file class.ilTemplate.php.

◆ $mount_webfolder

ilTemplate::$mount_webfolder = ""
protected

Definition at line 48 of file class.ilTemplate.php.

Referenced by fillSideIcons().

◆ $page_actions

ilTemplate::$page_actions = array()
protected

Definition at line 51 of file class.ilTemplate.php.

◆ $page_form_action

ilTemplate::$page_form_action = ""
protected

Definition at line 50 of file class.ilTemplate.php.

◆ $permanent_link

ilTemplate::$permanent_link = false
protected

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

◆ $stop_floating

ilTemplate::$stop_floating = ""
protected

Definition at line 49 of file class.ilTemplate.php.

◆ $title_alerts

ilTemplate::$title_alerts = array()
protected

Definition at line 55 of file class.ilTemplate.php.

◆ $title_desc

ilTemplate::$title_desc = ""
protected

Definition at line 44 of file class.ilTemplate.php.

◆ $title_url

ilTemplate::$title_url = ""
protected

Definition at line 45 of file class.ilTemplate.php.

◆ $translation_linked

ilTemplate::$translation_linked = false
protected

Definition at line 59 of file class.ilTemplate.php.

◆ $tree_flat_link

ilTemplate::$tree_flat_link = ""
protected

Definition at line 47 of file class.ilTemplate.php.

◆ $upper_icon

ilTemplate::$upper_icon = ""
protected

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

◆ $vars

ilTemplate::$vars

Definition at line 22 of file class.ilTemplate.php.


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