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

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

Protected Attributes

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

Static Protected Attributes

static $il_cache = array()

Private Member Functions

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

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

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

Add a command to the admin panel.

Deprecated:
use addAdminPanelToolbar

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

{
$this->admin_panel_commands[] =
array("cmd" => $a_cmd, "txt" => $a_txt);
if ($a_arrow)
{
$this->admin_panel_arrow = true;
}
$this->admin_panel_top_only = false;
}
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 2216 of file class.ilTemplate.php.

{
$this->admin_panel_commands_toolbar = $toolb;
$this->admin_panel_arrow = $a_arrow;
$this->admin_panel_bottom = $a_bottom_panel;
}
ilTemplate::addBlockFile (   $var,
  $block,
  $tplname,
  $in_module = false 
)

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

References addBlockFile(), and getTemplatePath().

{
if (DEBUG)
{
echo "<br/>Template '".$this->tplPath."/".$tplname."'";
}
$tplfile = $this->getTemplatePath($tplname, $in_module);
if (file_exists($tplfile) == false)
{
echo "<br/>Template '".$tplfile."' doesn't exist! aborting...";
return false;
}
return parent::addBlockFile($var, $block, $tplfile);
}

+ Here is the call graph for this function:

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

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

Referenced by addBlockFile(), and getStandardTemplate().

{
if (DEBUG)
{
echo "<br/>Template '".$this->tplPath."/".$tplname."'";
}
$tplfile = $this->getTemplatePath($tplname, $in_module);
if (file_exists($tplfile) == false)
{
echo "<br/>Template '".$tplfile."' doesn't exist! aborting...";
return false;
}
$id = $this->getTemplateIdentifier($tplname, $in_module);
$template = $this->getFile($tplfile);
// include the template input hook
global $ilPluginAdmin;
$pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
foreach ($pl_names as $pl)
{
$ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
$gui_class = $ui_plugin->getUIClassInstance();
$resp = $gui_class->getHTML("", "template_add",
array("tpl_id" => $id, "tpl_obj" => $this, "html" => $template));
if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
{
$template = $gui_class->modifyHTML($template, $resp);
}
}
return $this->addBlock($var, $block, $template);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

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

{
if (!array_key_exists($a_css_file . $media, $this->css_files))
{
$this->css_files[$a_css_file . $media] = array("file" => $a_css_file, "media" => $media);
}
}
ilTemplate::addILIASFooter ( )

add ILIAS footer

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

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

Referenced by get(), and show().

{
global $ilAuth;
if (!$this->getAddFooter()) return;
global $ilias, $ilClientIniFile, $ilCtrl, $ilDB, $ilSetting, $lng;
$ftpl = new ilTemplate("tpl.footer.html", true, true, "Services/UICore");
$ftpl->setVariable("ILIAS_VERSION", $ilias->getSetting("ilias_version"));
$link_items = array();
// imprint
include_once "Services/Imprint/classes/class.ilImprint.php";
if($_REQUEST["baseClass"] != "ilImprintGUI" && ilImprint::isActive())
{
include_once "Services/Link/classes/class.ilLink.php";
$link_items[ilLink::_getStaticLink(0, "impr")] = array($lng->txt("imprint"), true);
}
$link_items["mailto:".$ilSetting->get("feedback_recipient")] = array($lng->txt("contact_sysadmin"), false);
if (DEVMODE && version_compare(PHP_VERSION,'5','>='))
{
$link_items[ilUtil::appendUrlParameterString($_SERVER["REQUEST_URI"], "do_dev_validate=xhtml")] = array("Validate", true);
$link_items[ilUtil::appendUrlParameterString($_SERVER["REQUEST_URI"], "do_dev_validate=accessibility")] = array("Accessibility", true);
}
$cnt = 0;
foreach($link_items as $url => $caption)
{
$cnt ++;
if($caption[1])
{
$ftpl->touchBlock("blank");
}
if($cnt < sizeof($link_items))
{
$ftpl->touchBlock("item_separator");
}
$ftpl->setCurrentBlock("items");
$ftpl->setVariable("URL_ITEM", $url);
$ftpl->setVariable("TXT_ITEM", $caption[0]);
$ftpl->parseCurrentBlock();
}
// output translation link
if ($ilSetting->get("lang_ext_maintenance") == "1")
{
include_once("Services/Language/classes/class.ilObjLanguageAccess.php");
{
include_once("Services/Language/classes/class.ilObjLanguageExtGUI.php");
$ftpl->setVariable("TRANSLATION_LINK",
}
}
if (DEVMODE)
{
// execution time
$t1 = explode(" ", $GLOBALS['ilGlobalStartTime']);
$t2 = explode(" ", microtime());
$diff = $t2[0] - $t1[0] + $t2[1] - $t1[1];
$mem_usage = array();
if(function_exists("memory_get_usage"))
{
$mem_usage[] =
"Memory Usage: ".memory_get_usage()." Bytes";
}
if(function_exists("xdebug_peak_memory_usage"))
{
$mem_usage[] =
"XDebug Peak Memory Usage: ".xdebug_peak_memory_usage()." Bytes";
}
$mem_usage[] = round($diff, 4)." Seconds";
if (sizeof($mem_usage))
{
$ftpl->setVariable("MEMORY_USAGE", "<br>".implode(" | ", $mem_usage));
}
if (is_object($ilAuth) && isset($_SESSION[$ilAuth->_sessionName]) &&
isset($_SESSION[$ilAuth->_sessionName]["timestamp"]))
{
$ftpl->setVariable("SESS_INFO", "<br />maxlifetime: ".
ini_get("session.gc_maxlifetime")." (".
(ini_get("session.gc_maxlifetime")/60)."), id: ".session_id()."<br />".
"timestamp: ".date("Y-m-d H:i:s", $_SESSION[$ilAuth->_sessionName]["timestamp"]).
", idle: ".date("Y-m-d H:i:s", $_SESSION[$ilAuth->_sessionName]["idle"]).
"<br />expire: ".($exp = $ilClientIniFile->readVariable("session","expire")).
" (".($exp/60)."), session ends at: ".
date("Y-m-d H:i:s", $_SESSION[$ilAuth->_sessionName]["idle"] + $exp));
}
if (!empty($_GET["do_dev_validate"]) && $ftpl->blockExists("xhtml_validation"))
{
require_once("Services/XHTMLValidator/classes/class.ilValidatorAdapter.php");
$template2 = clone($this);
//echo "-".ilValidatorAdapter::validate($template2->get(), $_GET["do_dev_validate"])."-";
$ftpl->setCurrentBlock("xhtml_validation");
$ftpl->setVariable("VALIDATION",
ilValidatorAdapter::validate($template2->get("DEFAULT",
false, false, false, true), $_GET["do_dev_validate"]));
$ftpl->parseCurrentBlock();
}
// controller history
if (is_object($ilCtrl) && $ftpl->blockExists("c_entry") &&
$ftpl->blockExists("call_history"))
{
$hist = $ilCtrl->getCallHistory();
foreach($hist as $entry)
{
$ftpl->setCurrentBlock("c_entry");
$ftpl->setVariable("C_ENTRY", $entry["class"]);
if (is_object($ilDB))
{
$file = $ilCtrl->lookupClassPath($entry["class"]);
$add = $entry["mode"]." - ".$entry["cmd"];
if ($file != "")
{
$add.= " - ".$file;
}
$ftpl->setVariable("C_FILE", $add);
}
$ftpl->parseCurrentBlock();
}
$ftpl->setCurrentBlock("call_history");
$ftpl->parseCurrentBlock();
// debug hack
$debug = $ilCtrl->getDebug();
foreach($debug as $d)
{
$ftpl->setCurrentBlock("c_entry");
$ftpl->setVariable("C_ENTRY", $d);
$ftpl->parseCurrentBlock();
}
$ftpl->setCurrentBlock("call_history");
$ftpl->parseCurrentBlock();
}
// included files
if (is_object($ilCtrl) && $ftpl->blockExists("i_entry") &&
$ftpl->blockExists("included_files"))
{
$fs = get_included_files();
$ifiles = array();
$total = 0;
foreach($fs as $f)
{
$ifiles[] = array("file" => $f, "size" => filesize($f));
$total += filesize($f);
}
$ifiles = ilUtil::sortArray($ifiles, "size", "desc", true);
foreach($ifiles as $f)
{
$ftpl->setCurrentBlock("i_entry");
$ftpl->setVariable("I_ENTRY", $f["file"]." (".$f["size"]." Bytes, ".round(100 / $total * $f["size"], 2)."%)");
$ftpl->parseCurrentBlock();
}
$ftpl->setCurrentBlock("i_entry");
$ftpl->setVariable("I_ENTRY", "Total (".$total." Bytes, 100%)");
$ftpl->parseCurrentBlock();
$ftpl->setCurrentBlock("included_files");
$ftpl->parseCurrentBlock();
}
}
// BEGIN Usability: Non-Delos Skins can display the elapsed time in the footer
// The corresponding $ilBench->start invocation is in inc.header.php
global $ilBench;
$ilBench->stop("Core", "ElapsedTimeUntilFooter");
$ftpl->setVariable("ELAPSED_TIME",
", ".number_format($ilBench->getMeasuredTime("Core", "ElapsedTimeUntilFooter"),1).' seconds');
// END Usability: Non-Delos Skins can display the elapsed time in the footer
$this->setVariable("FOOTER", $ftpl->get());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

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

{
$this->inline_css[] = array("css" => $a_css, "media" => $media);
}
ilTemplate::addJavaScript (   $a_js_file)

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

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

{
if (!in_array($a_js_file, $this->js_files))
{
$this->js_files[] = $a_js_file;
}
}
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 2069 of file class.ilTemplate.php.

{
// three batches currently
if ($a_batch < 1 || $a_batch > 3)
{
$a_batch = 2;
}
if (!in_array($a_js_file, $this->js_files))
{
$this->js_files[] = $a_js_file;
$this->js_files_vp[$a_js_file] = $a_add_version_parameter;
$this->js_files_batch[$a_js_file] = $a_batch;
}
}
ilTemplate::addLightbox (   $a_html,
  $a_id 
)

Add lightbox html.

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

{
$this->lightbox[$a_id] = $a_html;
}
ilTemplate::addOnLoadCode (   $a_code,
  $a_batch = 2 
)

Add on load code.

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

{
// three batches currently
if ($a_batch < 1 || $a_batch > 3)
{
$a_batch = 2;
}
$this->on_load_code[$a_batch][] = $a_code;
}
ilTemplate::blockExists (   $a_blockname)

check if block exists in actual template private

Parameters
stringblockname
Returns
boolean

Reimplemented from HTML_Template_ITX.

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

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

check if block exists in actual template private

Parameters
stringblockname
Returns
boolean

Reimplemented from HTML_Template_ITX.

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

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

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

+ Here is the caller graph for this function:

ilTemplate::checkTopic (   $a_block,
  $a_topic 
)

checks for a topic in the template private

Parameters
string
string
Returns
boolean

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

Referenced by includeNavigation(), and includeTree().

{
return array_key_exists($a_topic, $this->blockvariables[$a_block]);
}

+ Here is the caller graph for this function:

ilTemplate::fileExists (   $filename)

check if a file exists public

Returns
boolean

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

References $filename.

{
return file_exists($this->tplPath."/".$filename);
}
ilTemplate::fillAdminPanel ( )

Put admin panel into template:

  • creation selector
  • admin view on/off button

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

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

Referenced by get(), and show().

{
global $lng, $ilHelp;
$adm_view_cmp = $adm_cmds = $creation_selector = $adm_view = false;
$toolb = new ilToolbarGUI();
// admin panel commands
if ((count($this->admin_panel_commands) > 0))
{
foreach($this->admin_panel_commands as $cmd)
{
$toolb->addFormButton($cmd["txt"], $cmd["cmd"]);
}
$adm_cmds = true;
}
elseif($this->admin_panel_commands_toolbar instanceof ilToolbarGUI)
{
$toolb = $this->admin_panel_commands_toolbar;
$adm_cmds = true;
}
// Add arrow if desired
if($this->admin_panel_arrow)
{
$toolb->setLeadingImage(ilUtil::getImagePath("arrow_upright.png"), $lng->txt("actions"));
}
if ($adm_cmds)
{
$this->setCurrentBlock("adm_view_components");
$this->setVariable("ADM_PANEL1", $toolb->getHTML());
$adm_view_cmp = true;
}
// admin view button
if ($this->page_actions != "")
{
$this->setVariable("PAGE_ACTIONS", $this->page_actions);
$adm_view = true;
}
// creation selector
if (is_array($this->creation_selector))
{
$this->setCurrentBlock("add_commands");
if ($adm_cmds)
{
$this->setVariable("ADD_COM_WIDTH", 'width="1"');
}
include_once("./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
$selection = new ilAdvancedSelectionListGUI();
$selection->setListTitle($lng->txt("cntr_add_new_item"));
$selection->setId("item_creation");
$selection->setHeaderIcon(ilUtil::getImagePath("cmd_add_s.png"));
$selection->setItemLinkClass("xsmall");
$selection->setUseImages(true);
foreach ($this->creation_selector["options"] as $item)
{
$link = $this->page_form_action."&new_type=".$item["value"];
$link = str_replace("cmd=post", "cmd=".$this->creation_selector["command"], $link);
$ttip = ilHelp::getObjCreationTooltipText($item["value"]);
$selection->addItem($item["title"], $item["value"], $link,
$item["img"], $item["title"], "", "", false, "", $ttip,
"right center", "left center", false);
}
$this->setVariable("SELECT_OBJTYPE_REPOS",
$selection->getHTML());
$this->setVariable("CENTER_COL_CLASS", trim($this->right_content) != "" ? "one_side_col" : "");
}
if ($adm_cmds and $this->admin_panel_bottom)
{
$this->setCurrentBlock("adm_view_components2");
if ($this->admin_panel_arrow)
{
$toolb->setLeadingImage(ilUtil::getImagePath("arrow_downright.png"), $lng->txt("actions"));
}
$this->setVariable("ADM_PANEL2", $toolb->getHTML());
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillBodyClass ( )

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

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

Referenced by get(), and show().

{
if ($this->body_class != "" && $this->blockExists("body_class"))
{
$this->setCurrentBlock("body_class");
$this->setVariable("BODY_CLASS", $this->body_class);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillContentLanguage ( )

Add current user language to meta tags.

public

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

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

Referenced by get(), and show().

{
global $ilUser,$lng;
if(is_object($ilUser))
{
if($ilUser->getLanguage())
{
$this->setVariable('META_CONTENT_LANGUAGE',$ilUser->getLanguage());
return true;
}
if(is_object($lng))
{
$this->setVariable('META_CONTENT_LANGUAGE',$lng->getDefaultLanguage());
return true;
}
}
$this->setVariable('META_CONTENT_LANGUAGE','en');
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillContentStyle ( )

Fill Content Style.

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

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

Referenced by get(), and show().

{
if ($this->content_style_sheet != "")
{
$this->setCurrentBlock("ContentStyle");
$this->setVariable("LOCATION_CONTENT_STYLESHEET",
$this->content_style_sheet);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillCssFiles (   $a_force = false)

Fill in the css file tags.

Parameters
boolean$a_force

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

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

Referenced by get(), and show().

{
if (!$this->blockExists("css_file"))
{
return;
}
foreach($this->css_files as $css)
{
$filename = $css["file"];
if (strpos($filename, "?") > 0) $filename = substr($filename, 0, strpos($filename, "?"));
if (is_file($filename) || $a_force)
{
$this->setCurrentBlock("css_file");
$this->setVariable("CSS_FILE", $css["file"]);
$this->setVariable("CSS_MEDIA", $css["media"]);
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillHeader ( )
private

Fill header.

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

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

Referenced by get(), and show().

{
global $lng, $ilUser, $ilCtrl;
if($this->frame_fixed_width)
{
$this->setVariable("FRAME_FIXED_WIDTH", " ilFrameFixedWidth");
}
$icon = false;
if ($this->icon_path != "")
{
$icon = true;
if ($this->icon_desc != "")
{
$this->setCurrentBlock("header_image_desc");
$this->setVariable("IMAGE_DESC", $lng->txt("icon")." ".$this->icon_desc);
}
$this->setCurrentBlock("header_image");
if ($this->icon_desc != "")
{
$this->setVariable("IMAGE_ALT", $lng->txt("icon")." ".$this->icon_desc);
}
else
{
// empty alt tag for images that, e.g. are directly attached in heading
// and would only repeat the heading text
$this->setVariable("IMAGE_ALT", "");
}
$this->setVariable("IMG_HEADER", $this->icon_path);
$header = true;
}
if ($this->title != "")
{
$this->title = ilUtil::stripScriptHTML($this->title);
$this->setVariable("HEADER", $this->title);
if ($icon)
{
$this->setVariable("HICONCL", "ilHeaderHasIcon");
}
$header = true;
}
if ($header)
{
$this->setCurrentBlock("header_image");
}
if ($this->title_desc != "")
{
$this->setCurrentBlock("header_desc");
$this->setVariable("H_DESCRIPTION", $this->title_desc);
}
$header = $this->getHeaderActionMenu();
if ($header)
{
$this->setCurrentBlock("head_action_inner");
$this->setVariable("HEAD_ACTION", $header);
$this->touchBlock("head_action");
}
if(count((array) $this->title_alerts))
{
foreach($this->title_alerts as $alert)
{
$this->setCurrentBlock('header_alert');
if(!($alert['propertyNameVisible'] === false))
{
$this->setVariable('H_PROP', $alert['property'].':');
}
$this->setVariable('H_VALUE', $alert['value']);
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillInlineCss ( )

Fill in the inline css.

Parameters
boolean$a_force

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

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

Referenced by get(), and show().

{
if (!$this->blockExists("css_inline"))
{
return;
}
foreach($this->inline_css as $css)
{
$this->setCurrentBlock("css_file");
$this->setVariable("CSS_INLINE", $css["css"]);
//$this->setVariable("CSS_MEDIA", $css["media"]);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillJavaScriptFiles ( )

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

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

Referenced by get(), and show().

{
global $ilias,$ilTabs;
if ($this->blockExists("js_file"))
{
foreach($this->js_files as $file)
{
if (is_file($file) || substr($file, 0, 4) == "http")
{
$this->setCurrentBlock("js_file");
$this->setVariable("JS_FILE", $file);
}
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillJavaScriptFiles (   $a_force = false)

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

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

{
global $ilias, $ilTabs, $ilSetting, $ilUser;
if (is_object($ilSetting)) // maybe this one can be removed
{
$vers = "vers=".str_replace(array(".", " "), "-", $ilSetting->get("ilias_version"));
}
if ($this->blockExists("js_file"))
{
// three batches
for ($i=1; $i<=3; $i++)
{
reset($this->js_files);
foreach($this->js_files as $file)
{
if (is_file($file) || substr($file, 0, 4) == "http" || substr($file, 0, 2) == "//" || $a_force)
{
if ($this->js_files_batch[$file] == $i)
{
$this->setCurrentBlock("js_file");
if ($this->js_files_vp[$file])
{
$this->setVariable("JS_FILE", ilUtil::appendUrlParameterString($file,$vers));
}
else
{
$this->setVariable("JS_FILE", $file);
}
}
}
}
}
}
}

+ Here is the call graph for this function:

ilTemplate::fillLeftContent ( )
private

Fill left content.

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

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

Referenced by get(), and show().

{
if (trim($this->left_content) != "")
{
$this->setCurrentBlock("left_column");
$this->setVariable("LEFT_CONTENT", $this->left_content);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillLeftNav ( )
private

Fill left navigation frame.

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

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

Referenced by get(), and show().

{
if (trim($this->left_nav_content) != "")
{
$this->setCurrentBlock("left_nav");
$this->setVariable("LEFT_NAV_CONTENT", $this->left_nav_content);
$this->touchBlock("left_nav_space");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillLightbox ( )

Fill lightbox content.

Parameters
@return

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

References HTML_Template_IT\setVariable().

Referenced by get(), and show().

{
$html = "";
foreach ($this->lightbox as $lb)
{
$html.= $lb;
}
$this->setVariable("LIGHTBOX", $html);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillMainContent ( )

Fill main content.

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

References HTML_Template_IT\setVariable().

Referenced by get(), and show().

{
if (trim($this->main_content) != "")
{
$this->setVariable("ADM_CONTENT", $this->main_content);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillMainMenu ( )

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

References $tpl, and variableExists().

Referenced by get(), and show().

{
global $tpl;
if($this->variableExists('MAINMENU'))
{
$tpl->setVariable("MAINMENU", $this->main_menu);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillMessage ( )

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

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

Referenced by get(), and show().

{
global $lng;
$ms = array("info", "success", "failure", "question");
$out = "";
foreach ($ms as $m)
{
$txt = "";
if ($m == "question")
{
$m = "mess_question";
}
if (isset($_SESSION[$m]) && $_SESSION[$m] != "")
{
$txt = $_SESSION[$m];
}
else if (isset($this->message[$m]))
{
$txt = $this->message[$m];
}
if ($m == "mess_question")
{
$m = "question";
}
if ($txt != "")
{
$out.= $this->getMessageHTML($txt, $m);
}
if ($m == "question")
{
$m = "mess_question";
}
if (isset($_SESSION[$m]) && $_SESSION[$m])
{
unset($_SESSION[$m]);
}
}
if ($out != "")
{
$this->setVariable("MESSAGE", $out);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillMessage ( )

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

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

{
global $lng;
$ms = array("info", "success", "failure", "question");
$out = "";
foreach ($ms as $m)
{
if ($m == "question")
{
$m = "mess_question";
}
$txt = (ilSession::get($m) != "")
: $this->message[$m];
if ($m == "mess_question")
{
$m = "question";
}
if ($txt != "")
{
$mtpl = new ilTemplate("tpl.message.html", true, true, "Services/Utilities");
$mtpl->setCurrentBlock($m."_message");
$mtpl->setVariable("TEXT", $txt);
$mtpl->setVariable("MESSAGE_HEADING", $lng->txt($m."_message"));
$mtpl->setVariable("ALT_IMAGE", $lng->txt("icon")." ".$lng->txt($m."_message"));
$mtpl->setVariable("SRC_IMAGE", ilUtil::getImagePath("mess_".$m.".png"));
$mtpl->parseCurrentBlock();
$out.= $mtpl->get();
}
if ($m == "question")
{
$m = "mess_question";
}
if (ilSession::get($m))
{
}
}
if ($out != "")
{
$this->setVariable("MESSAGE", $out);
}
}

+ Here is the call graph for this function:

ilTemplate::fillNewContentStyle ( )
private

Fill Content Style.

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

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

Referenced by get(), and show().

{
$this->setVariable("LOCATION_NEWCONTENT_STYLESHEET_TAG",
'<link rel="stylesheet" type="text/css" href="'.
.'" />');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillOnLoadCode ( )

Fill add on load code.

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

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

Referenced by get(), and show().

{
for ($i = 1; $i <= 3; $i++)
{
if (is_array($this->on_load_code[$i]))
{
$this->setCurrentBlock("on_load_code");
foreach ($this->on_load_code[$i] as $code)
{
$this->setCurrentBlock("on_load_code_inner");
$this->setVariable("OLCODE", $code);
}
$this->setCurrentBlock("on_load_code");
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillPageFormAction ( )

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

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

Referenced by fillAdminPanel().

{
if ($this->page_form_action != "")
{
$this->setCurrentBlock("page_form_start");
$this->setVariable("PAGE_FORM_ACTION", $this->page_form_action);
$this->touchBlock("page_form_end");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillPermanentLink ( )

Fill in permanent link.

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

References HTML_Template_IT\setVariable().

Referenced by get(), and show().

{
if (is_array($this->permanent_link))
{
include_once("./Services/PermanentLink/classes/class.ilPermanentLinkGUI.php");
$plinkgui = new ilPermanentLinkGUI(
$this->permanent_link["type"],
$this->permanent_link["id"],
$this->permanent_link["append"],
$this->permanent_link["target"]);
$this->setVariable("PRMLINK", $plinkgui->getHTML());
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillRightContent ( )
private

Fill right content.

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

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

Referenced by get(), and show().

{
if (trim($this->right_content) != "")
{
$this->setCurrentBlock("right_column");
$this->setVariable("RIGHT_CONTENT", $this->right_content);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillScreenReaderFocus ( )

Accessibility focus for screen readers.

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

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

Referenced by get(), and show().

{
global $ilUser;
if (is_object($ilUser) && $ilUser->getPref("screen_reader_optimization") && $this->blockExists('sr_focus'))
{
$this->touchBlock("sr_focus");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillSideIcons ( )

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

Definition at line 1950 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(), ilAccessKey\TREE_OFF, and ilAccessKey\TREE_ON.

Referenced by get(), and show().

{
global $lng, $ilSetting;
if ($this->upper_icon == "" && $this->tree_flat_link == ""
&& $this->mount_webfolder == "")
{
return;
}
// upper icon
if ($this->upper_icon != "")
{
if ($this->upper_icon_frame != "")
{
$this->setCurrentBlock("target_top");
$this->setVariable("TARGET_TOP", $this->upper_icon_frame);
}
$this->setCurrentBlock("alt_top");
$this->setVariable("ALT_TOP", $lng->txt("up"));
$this->setCurrentBlock("top");
$this->setVariable("LINK_TOP", $this->upper_icon);
$this->setVariable("IMG_TOP",ilUtil::getImagePath("ic_top.png"));
}
// tree/flat icon
if ($this->tree_flat_link != "")
{
$this->setCurrentBlock("tree_mode");
$this->setVariable("LINK_MODE", $this->tree_flat_link);
if ($ilSetting->get("tree_frame") == "right")
{
if ($this->tree_flat_mode == "tree")
{
$this->setVariable("IMG_TREE",ilUtil::getImagePath("ic_sidebar_left.png"));
$this->setVariable("RIGHT", "Right");
}
else
{
$this->setVariable("IMG_TREE",ilUtil::getImagePath("ic_sidebar_right.png"));
$this->setVariable("RIGHT", "Right");
}
}
else
{
if ($this->tree_flat_mode == "tree")
{
$this->setVariable("IMG_TREE",ilUtil::getImagePath("ic_sidebar_right.png"));
}
else
{
$this->setVariable("IMG_TREE",ilUtil::getImagePath("ic_sidebar_left.png"));
}
}
$this->setVariable("ALT_TREE",$lng->txt($this->tree_flat_mode."view"));
$this->setVariable("TARGET_TREE", ilFrameTargetInfo::_getFrame("MainContent"));
include_once("./Services/Accessibility/classes/class.ilAccessKeyGUI.php");
$this->setVariable("TREE_ACC_KEY",
ilAccessKeyGUI::getAttribute(($this->tree_flat_mode == "tree")
}
// mount webfolder
if ($this->mount_webfolder != "")
{
require_once('Services/WebDAV/classes/class.ilDAVServer.php');
$davServer = new ilDAVServer();
$a_link = $davServer->getMountURI($a_ref_id);
$a_folder = $davServer->getFolderURI($a_ref_id);
$this->setCurrentBlock("mount_webfolder");
$this->setVariable("LINK_MOUNT_WEBFOLDER", $a_link);
$this->setVariable("FOLDER_MOUNT_WEBFOLDER", $a_folder);
$this->setVariable("IMG_MOUNT_WEBFOLDER",ilUtil::getImagePath("ic_mount_webfolder.png"));
$this->setVariable("ALT_MOUNT_WEBFOLDER",$lng->txt("mount_webfolder"));
$this->setVariable("TARGET_MOUNT_WEBFOLDER", '_blank');
}
$this->setCurrentBlock("tree_icons");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillStopFloating ( )
private

stop floating

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

References touchBlock().

Referenced by get(), and show().

{
if ($this->stop_floating)
{
$this->touchBlock("stop_floating");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillTabs ( )

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

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

Referenced by get(), and show().

{
global $ilias,$ilTabs;
if ($this->blockExists("tabs_outer_start"))
{
$this->touchBlock("tabs_outer_start");
$this->touchBlock("tabs_outer_end");
$this->touchBlock("tabs_inner_start");
$this->touchBlock("tabs_inner_end");
if ($this->thtml != "")
{
$this->setVariable("TABS",$this->thtml);
}
$this->setVariable("SUB_TABS", $this->sthtml);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillToolbar ( )

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

References HTML_Template_IT\setVariable().

Referenced by get(), and show().

{
global $ilToolbar;
$this->setVariable("BUTTONS", $ilToolbar->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

References HTML_Template_IT\setVariable().

Referenced by parseCurrentBlock(), and touchBlock().

{
$count = 0;
reset($this->vars);
while(list($key, $val) = each($this->vars))
{
if (is_array($this->blockvariables[$this->activeBlock]))
{
if (array_key_exists($key, $this->blockvariables[$this->activeBlock]))
{
$count++;
$this->setVariable($key, $val);
}
}
}
return $count;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::fillWindowTitle ( )

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

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

Referenced by get(), and show().

{
global $ilSetting;
if ($this->header_page_title != "")
{
$a_title = ilUtil::stripScriptHTML($this->header_page_title);
$this->setVariable("PAGETITLE", "- ".$a_title);
}
if ($ilSetting->get('short_inst_name') != "")
{
$this->setVariable("WINDOW_TITLE",
$ilSetting->get('short_inst_name'));
}
else
{
$this->setVariable("WINDOW_TITLE",
"ILIAS");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

Referenced by fillMessage(), get(), and show().

{
if ($add_error_mess)
{
$this->fillMessage();
}
if ($add_ilias_footer)
{
$this->addILIASFooter();
}
// set standard parts (tabs and title icon)
if($add_standard_elements)
{
if ($this->blockExists("content") && $a_tabs)
{
// determine default screen id
$this->getTabsHTML();
}
// to get also the js files for the main menu
$this->getMainMenu();
$this->initHelp();
// these fill blocks in tpl.main.html
$this->fillCssFiles();
$this->fillInlineCss();
$this->fillContentStyle();
$this->fillBodyClass();
// these fill just plain placeholder variables in tpl.main.html
$this->setCurrentBlock("DEFAULT");
$this->fillWindowTitle();
// these fill blocks in tpl.adm_content.html
$this->fillHeader();
$this->fillSideIcons();
$this->fillStopFloating();
$this->fillLeftContent();
$this->fillLeftNav();
$this->fillRightContent();
$this->fillAdminPanel();
$this->fillToolbar();
// late loading of javascipr files, since operations above may add files
$this->fillOnLoadCode();
// these fill just plain placeholder variables in tpl.adm_content.html
if ($this->blockExists("content"))
{
$this->setCurrentBlock("content");
if ($a_tabs)
{
$this->fillTabs();
}
$this->fillMainContent();
if ($a_main_menu)
{
$this->fillMainMenu();
}
$this->fillLightbox();
}
}
if ($handle_referer)
{
$this->handleReferer();
}
if ($part == "DEFAULT")
{
$html = parent::get();
}
else
{
$html = parent::get($part);
}
// include the template output hook
global $ilPluginAdmin;
$pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
foreach ($pl_names as $pl)
{
$ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
$gui_class = $ui_plugin->getUIClassInstance();
$resp = $gui_class->getHTML("", "template_get",
array("tpl_id" => $this->tplIdentifier, "tpl_obj" => $this, "html" => $html));
if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
{
$html = $gui_class->modifyHTML($html, $resp);
}
}
return $html;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Returns a block with all replacements done.

Parameters
stringname of the block
Returns
string
Exceptions
PEAR_Errorpublic
See Also
show()

Reimplemented from HTML_Template_IT.

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

References get().

{
if ($part == "DEFAULT")
{
return parent::get();
}
else
{
return parent::get($part);
}
}

+ Here is the call graph for this function:

ilTemplate::getAddFooter ( )

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

References $addFooter.

Referenced by addILIASFooter().

{
}

+ Here is the caller graph for this function:

ilTemplate::getAsynch ( )

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

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

References getContentType().

{
header("Content-type: " . $this->getContentType() . "; charset=UTF-8");
return $this->get();
}

+ Here is the call graph for this function:

ilTemplate::getContentType ( )

Get the content type for the template output.

Returns
string Content type public

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

References $contenttype.

Referenced by getAsynch(), and show().

{
}

+ Here is the caller graph for this function:

ilTemplate::getHeaderActionMenu ( )

Get header action menu.

Returns
int ref id

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

References $header_action.

Referenced by fillHeader().

{
}

+ Here is the caller graph for this function:

ilTemplate::getLoginTargetPar ( )

Get target parameter for login.

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

Referenced by getMainMenu().

{
return $this->login_target_par;
}

+ Here is the caller graph for this function:

ilTemplate::getMainMenu ( )

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

References getLoginTargetPar(), and variableExists().

Referenced by get(), and show().

{
global $ilMainMenu;
if($this->variableExists('MAINMENU'))
{
$ilMainMenu->setLoginTargetPar($this->getLoginTargetPar());
$this->main_menu = $ilMainMenu->getHTML();
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Get HTML for a system message.

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

References $lng, ilUtil\getImagePath(), and ilTemplate().

{
global $lng;
$mtpl = new ilTemplate("tpl.message.html", true, true, "Services/Utilities");
$mtpl->setCurrentBlock($a_type."_message");
$mtpl->setVariable("TEXT", $a_txt);
$mtpl->setVariable("MESSAGE_HEADING", $lng->txt($a_type."_message"));
$mtpl->setVariable("ALT_IMAGE", $lng->txt("icon")." ".$lng->txt($a_type."_message"));
$mtpl->setVariable("SRC_IMAGE", ilUtil::getImagePath("mess_".$a_type.".png"));
$mtpl->parseCurrentBlock();
return $mtpl->get();
}

+ Here is the call graph for this function:

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

Get HTML for a system message.

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

References $lng, ilUtil\getImagePath(), and ilTemplate().

Referenced by fillMessage(), and show().

{
global $lng;
$mtpl = new ilTemplate("tpl.message.html", true, true, "Services/Utilities");
$mtpl->setCurrentBlock($a_type."_message");
$mtpl->setVariable("TEXT", $a_txt);
$mtpl->setVariable("MESSAGE_HEADING", $lng->txt($a_type."_message"));
$mtpl->setVariable("ALT_IMAGE", $lng->txt("icon")." ".$lng->txt($a_type."_message"));
$mtpl->setVariable("SRC_IMAGE", ilUtil::getImagePath("mess_".$a_type.".png"));
$mtpl->parseCurrentBlock();
return $mtpl->get();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::getStandardTemplate ( )

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

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

{
// always load jQuery
include_once("./Services/jQuery/classes/class.iljQueryUtil.php");
// always load Basic js
// $this->addJavaScript("./Services/JavaScript/js/Basic.js",
// true, 1);
$this->addBlockFile("CONTENT", "content", "tpl.adm_content.html");
$this->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
}

+ Here is the call graph for this function:

ilTemplate::getTabsHTML ( )

Get tabs HTML.

Parameters
@return

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

References blockExists().

Referenced by get(), and show().

{
global $ilTabs;
if ($this->blockExists("tabs_outer_start"))
{
$this->sthtml = $ilTabs->getSubTabHTML();
$this->thtml = $ilTabs->getHTML((trim($sthtml) == ""));
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

References $_GET, $ilCtrl, and ILIAS_MODULE.

Referenced by addBlockFile(), and ilTemplate().

{
global $ilCtrl;
// if baseClass functionality is used (ilias.php):
// get template directory from ilCtrl
if (!empty($_GET["baseClass"]) && $a_in_module === true)
{
$a_in_module = $ilCtrl->getModuleDir();
}
if (strpos($a_tplname,"/") === false)
{
if ($a_in_module)
{
if ($a_in_module === true)
{
$module_path = ILIAS_MODULE."/";
}
else
{
$module_path = $a_in_module."/";
}
}
else
{
$module_path = "";
}
return $module_path.basename($a_tplname);
}
else
{
return $a_tplname;
}
}

+ Here is the caller graph for this function:

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

References $_GET, $ilCtrl, and ILIAS_MODULE.

{
global $ilias, $ilCtrl;
// if baseClass functionality is used (ilias.php):
// get template directory from ilCtrl
if (!empty($_GET["baseClass"]) && $a_in_module === true)
{
$a_in_module = $ilCtrl->getModuleDir();
}
if (strpos($a_tplname,"/") === false)
{
$module_path = "";
//$fname = $ilias->tplPath;
if ($a_in_module)
{
if ($a_in_module === true)
{
$module_path = ILIAS_MODULE."/";
}
else
{
$module_path = $a_in_module."/";
}
}
if($fname == "" || !file_exists($fname))
{
if ($a_in_module == "setup")
{
$fname = "./".$module_path."templates/".basename($a_tplname);
}
else
{
$fname = "./".$module_path."templates/default/".basename($a_tplname);
}
}
}
else
{
$fname = $a_tplname;
}
return $fname;
}
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 1438 of file class.ilTemplate.php.

References $_GET, $ilCtrl, ilStyleDefinition\getCurrentSkin(), and ILIAS_MODULE.

Referenced by addBlockFile(), and ilTemplate().

{
global $ilias, $ilCtrl;
$fname = "";
// if baseClass functionality is used (ilias.php):
// get template directory from ilCtrl
if (!empty($_GET["baseClass"]) && $a_in_module === true)
{
$a_in_module = $ilCtrl->getModuleDir();
}
if (strpos($a_tplname,"/") === false)
{
$module_path = "";
//$fname = $ilias->tplPath;
if ($a_in_module)
{
if ($a_in_module === true)
{
$module_path = ILIAS_MODULE."/";
}
else
{
$module_path = $a_in_module."/";
}
}
// use ilStyleDefinition instead of account to get the current skin
include_once "Services/Style/classes/class.ilStyleDefinition.php";
{
$fname = "./Customizing/global/skin/".
ilStyleDefinition::getCurrentSkin()."/".$module_path.basename($a_tplname);
}
if($fname == "" || !file_exists($fname))
{
$fname = "./".$module_path."templates/default/".basename($a_tplname);
}
}
else
{
$fname = $a_tplname;
}
return $fname;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::handleReferer ( )

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

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

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

Referenced by get(), and show().

{
if (((substr(strrchr($_SERVER["PHP_SELF"],"/"),1) != "error.php")
&& (substr(strrchr($_SERVER["PHP_SELF"],"/"),1) != "adm_menu.php")
&& (substr(strrchr($_SERVER["PHP_SELF"],"/"),1) != "chat.php")))
{
$_SESSION["post_vars"] = $_POST;
// referer is modified if query string contains cmd=gateway and $_POST is not empty.
// this is a workaround to display formular again in case of error and if the referer points to another page
$url_parts = @parse_url($_SERVER["REQUEST_URI"]);
if(!$url_parts)
{
$protocol = (isset($_SERVER['HTTPS']) ? 'https' : 'http').'://';
$host = $_SERVER['HTTP_HOST'];
$path = $_SERVER['REQUEST_URI'];
$url_parts = @parse_url($protocol.$host.$path);
}
if (isset($url_parts["query"]) && preg_match("/cmd=gateway/",$url_parts["query"]) && (isset($_POST["cmd"]["create"])))
{
foreach ($_POST as $key => $val)
{
if (is_array($val))
{
$val = key($val);
}
$str .= "&".$key."=".$val;
}
$_SESSION["referer"] = preg_replace("/cmd=gateway/",substr($str,1),$_SERVER["REQUEST_URI"]);
$_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
}
else if (isset($url_parts["query"]) && preg_match("/cmd=post/",$url_parts["query"]) && (isset($_POST["cmd"]["create"])))
{
foreach ($_POST as $key => $val)
{
if (is_array($val))
{
$val = key($val);
}
$str .= "&".$key."=".$val;
}
$_SESSION["referer"] = preg_replace("/cmd=post/",substr($str,1),$_SERVER["REQUEST_URI"]);
if (isset($_GET['ref_id']))
{
$_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
}
else
{
$_SESSION['referer_ref_id'] = 0;
}
}
else
{
$_SESSION["referer"] = $_SERVER["REQUEST_URI"];
if (isset($_GET['ref_id']))
{
$_SESSION['referer_ref_id'] = (int) $_GET['ref_id'];
}
else
{
$_SESSION['referer_ref_id'] = 0;
}
}
unset($_SESSION["error_post_vars"]);
}
}

+ Here is the caller graph for this function:

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

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

{
$this->activeBlock = "__global__";
$this->vars = array();
$fname = $this->getTemplatePath($file, $in_module);
$this->tplName = basename($fname);
$this->tplPath = dirname($fname);
// set default content-type to text/html
$this->contenttype = "text/html";
if (!file_exists($fname))
{
die("template ".$fname." was not found.");
return false;
}
//$this->IntegratedTemplateExtension(dirname($fname));
$this->callConstructor();
//$this->loadTemplatefile(basename($fname), $flag1, $flag2);
$this->loadTemplatefile($fname, $flag1, $flag2);
//add tplPath to replacevars
$this->vars["TPLPATH"] = $this->tplPath;
// set Options
if (method_exists($this, "setOption"))
{
$this->setOption('use_preg', false);
}
return true;
}

+ Here is the call graph for this function:

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

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

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

{
global $ilias;
//echo "<br>-".$file."-";
$this->activeBlock = "__global__";
$this->vars = array();
$this->addFooter = TRUE;
$this->il_use_cache = $a_use_cache;
$this->il_cur_key = $file."/".$in_module;
$fname = $this->getTemplatePath($file, $in_module, $plugin);
$this->tplName = basename($fname);
$this->tplPath = dirname($fname);
// template identifier e.g. "Services/Calendar/tpl.minical.html"
$this->tplIdentifier = $this->getTemplateIdentifier($file, $in_module);
// set default content-type to text/html
$this->contenttype = "text/html";
if (!file_exists($fname))
{
$ilias->raiseError("template ".$fname." was not found.", $ilias->error_obj->FATAL);
return false;
}
//$this->IntegratedTemplateExtension(dirname($fname));
$this->callConstructor();
//$this->loadTemplatefile(basename($fname), $flag1, $flag2);
$this->loadTemplatefile($fname, $flag1, $flag2);
//add tplPath to replacevars
$this->vars["TPLPATH"] = $this->tplPath;
// set Options
if (method_exists($this, "setOption"))
{
$this->setOption('use_preg', false);
}
$this->setBodyClass("std");
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::includeNavigation ( )

check if there is a NAVIGATION-topic public

Returns
boolean

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

References checkTopic().

{
return $this->checkTopic("__global__", "NAVIGATION");
}

+ Here is the call graph for this function:

ilTemplate::includeTree ( )

check if there is a TREE-topic public

Returns
boolean

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

References checkTopic().

{
return $this->checkTopic("__global__", "TREE");
}

+ Here is the call graph for this function:

ilTemplate::init ( )

Clears all datafields of the object and rebuild the internal blocklist.

LoadTemplatefile() and setTemplate() automatically call this function when a new template is given. Don't use this function unless you know what you're doing.

public

See Also
free()

Reimplemented from HTML_Template_ITX.

Definition at line 115 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().

{
$this->free();
$cache_hit = false;
if ($this->il_use_cache)
{
// cache hit
if (isset(self::$il_cache[$this->il_cur_key]) && is_array(self::$il_cache[$this->il_cur_key]))
{
$cache_hit = true;
//echo "cache hit";
$this->err = self::$il_cache[$this->il_cur_key]["err"];
$this->flagBlocktrouble = self::$il_cache[$this->il_cur_key]["flagBlocktrouble"];
$this->blocklist = self::$il_cache[$this->il_cur_key]["blocklist"];
$this->blockdata = self::$il_cache[$this->il_cur_key]["blockdata"];
$this->blockinner = self::$il_cache[$this->il_cur_key]["blockinner"];
$this->blockparents = self::$il_cache[$this->il_cur_key]["blockparents"];
$this->blockvariables = self::$il_cache[$this->il_cur_key]["blockvariables"];
}
}
if (!$cache_hit)
{
$this->findBlocks($this->template);
$this->template = '';
if ($this->il_use_cache)
{
self::$il_cache[$this->il_cur_key]["err"] = $this->err;
self::$il_cache[$this->il_cur_key]["flagBlocktrouble"] = $this->flagBlocktrouble;
self::$il_cache[$this->il_cur_key]["blocklist"] = $this->blocklist;
self::$il_cache[$this->il_cur_key]["blockdata"] = $this->blockdata;
self::$il_cache[$this->il_cur_key]["blockinner"] = $this->blockinner;
self::$il_cache[$this->il_cur_key]["blockparents"] = $this->blockparents;
self::$il_cache[$this->il_cur_key]["blockvariables"] = $this->blockvariables;
}
}
// we don't need it any more
$this->template = '';
} // end func init

+ Here is the call graph for this function:

ilTemplate::initHelp ( )

Init help.

Parameters
@return

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

Referenced by get(), and show().

{
include_once("./Services/Help/classes/class.ilHelpGUI.php");
}

+ Here is the caller graph for this function:

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

Reimplemented from HTML_Template_IT.

Definition at line 1388 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().

{
// copied from IT:loadTemplateFile
$template = '';
if (!$this->flagCacheTemplatefile ||
$this->lastTemplatefile != $filename
) {
}
$this->lastTemplatefile = $filename;
// copied.
// new code to include the template input hook:
global $ilPluginAdmin;
$pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
foreach ($pl_names as $pl)
{
$ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
$gui_class = $ui_plugin->getUIClassInstance();
$resp = $gui_class->getHTML("", "template_load",
array("tpl_id" => $this->tplIdentifier, "tpl_obj" => $this, "html" => $template));
if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
{
$template = $gui_class->modifyHTML($template, $resp);
}
}
// new.
// copied from IT:loadTemplateFile
return $template != '' ?
$this->setTemplate(
) : false;
// copied.
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

References $activeBlock, and HTML_Template_IT\parseCurrentBlock().

{
// Hier erst noch ein replace aufrufen
if ($part != "DEFAULT")
{
$this->activeBlock = $part;
}
if ($part != "DEFAULT")
{
$this->activeBlock = $tmp;
}
//$this->fillVars();
$this->activeBlock = "__global__";
if ($part == "DEFAULT")
{
}
else
{
}
}

+ Here is the call graph for this function:

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

References $activeBlock, fillVars(), and HTML_Template_IT\parseCurrentBlock().

Referenced by ilSurveyPageGUI\renderPageNode().

{
// Hier erst noch ein replace aufrufen
if ($part != "DEFAULT")
{
$this->activeBlock = $part;
}
if ($part != "DEFAULT")
{
$this->activeBlock = $tmp;
}
$this->fillVars();
$this->activeBlock = "__global__";
if ($part == "DEFAULT")
{
}
else
{
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

References $vars.

{
if (!is_array($vars))
{
return;
}
reset($vars);
while (list($i) = each($vars))
{
$vars[$i] = stripslashes($vars[$i]);
$vars[$i] = htmlspecialchars($vars[$i]);
}
return($vars);
}
ilTemplate::replace ( )

??? public

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

References HTML_Template_IT\setVariable().

Referenced by replaceDefault(), and replaceFromDatabase().

{
reset($this->vars);
while(list($key, $val) = each($this->vars))
{
$this->setVariable($key, $val);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::replaceDefault ( )

??? public

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

References replace().

{
$this->replace($this->vars);
}

+ Here is the call graph for this function:

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

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

{
$res = $DB->selectDbAll();
while ($DB->getDbNextElement($res))
{
$this->setCurrentBlock($block);
$result = array();
reset($conv);
while (list ($key,$val) = each ($conv))
{
$result[$val]=$DB->element->data[$key];
}
if (($select != "default")
&& ($DB->element->data[$select["id"]]==$select["value"]
|| (strtolower($select["text"]) == "checked"
&& strpos( ",,".$select["value"].",," , ",".$DB->element->data[$select["id"]]."," )!=false)))
{
$result[$select["field"]] = $select["text"];
}
$this->replace($result);
$this->parseCurrentBlock($block);
}
}

+ Here is the call graph for this function:

ilTemplate::resetCss ( )

Reset css files.

Parameters
@return

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

{
$this->css_files = array();
}
ilTemplate::resetHeaderBlock ( )

Set variable.

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

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

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

{
$this->setTitle(null);
$this->setTitleIcon(null);
$this->setDescription(null);
$this->setAlertProperties(array());
$this->setHeaderActionMenu(null);
}

+ Here is the call graph for this function:

ilTemplate::resetJavascript ( )

Reset javascript files.

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

{
$this->js_files = array();
$this->js_files_vp = array();
$this->js_files_batch = array();
}
ilTemplate::setAddFooter (   $value)

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

{
$this->addFooter = $value;
}
ilTemplate::setAlertProperties ( array  $a_props)

Set alert properties.

Parameters
array$a_props
Returns
void

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

Referenced by resetHeaderBlock().

{
$this->title_alerts = $a_props;
}

+ Here is the caller graph for this function:

ilTemplate::setBodyClass (   $a_class = "")

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

Referenced by ilTemplate().

{
$this->body_class = $a_class;
}

+ Here is the caller graph for this function:

ilTemplate::setCenterColumnClass ( )
private

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

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

Referenced by get(), and show().

{
if (!$this->blockExists("center_col_width"))
{
return;
}
$center_column_class = "";
if (trim($this->right_content) != "" && trim($this->left_content) != "") {
$center_column_class = "two_side_col";
}
else if (trim($this->right_content) != "" || trim($this->left_content) != "") {
$center_column_class = "one_side_col";
}
$this->setCurrentBlock("center_col_width");
$this->setVariable("CENTER_COL", $center_column_class);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::setContent (   $a_html)

sets content for standard template

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

{
if ($a_html != "")
{
$this->main_content = $a_html;
}
}
ilTemplate::setContentStyleSheet (   $a_style)

Set content style (used for page content editor)

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

{
$this->content_style_sheet = $a_style;
}
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 420 of file class.ilTemplate.php.

{
$this->contenttype = $a_content_type;
}
ilTemplate::setCreationSelector (   $a_form_action,
  $a_options,
  $a_command,
  $a_txt 
)

Set selection and create button for adding new objects.

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

References setPageFormAction().

{
$this->setPageFormAction($a_form_action);
$this->creation_selector =
array("form_action" => $a_form_action,
"options" => $a_options,
"command" => $a_command,
"txt" => $a_txt);
}

+ Here is the call graph for this function:

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

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

public

Parameters
string
Returns
???

Reimplemented from HTML_Template_IT.

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

References setCurrentBlock().

{
$this->activeBlock = $part;
if ($part == "DEFAULT")
{
}
else
{
return parent::setCurrentBlock($part);
}
}

+ Here is the call graph for this function:

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

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

public

Parameters
string
Returns
???

Reimplemented from HTML_Template_IT.

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

Referenced by fillAdminPanel(), fillBodyClass(), fillContentStyle(), fillCssFiles(), fillHeader(), fillInlineCss(), fillJavaScriptFiles(), fillLeftContent(), fillLeftNav(), fillOnLoadCode(), fillPageFormAction(), fillRightContent(), fillSideIcons(), get(), ilSurveyPageGUI\renderPageNode(), replaceFromDatabase(), setCenterColumnClass(), setCurrentBlock(), setFullscreenHeader(), setTopBar(), show(), and touchBlock().

{
$this->activeBlock = $part;
if ($part == "DEFAULT")
{
}
else
{
return parent::setCurrentBlock($part);
}
}

+ Here is the caller graph for this function:

ilTemplate::setDescription (   $a_descr)

sets title in standard template

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

Referenced by resetHeaderBlock(), and setFullscreenHeader().

{
$this->title_desc = $a_descr;
// $this->setVariable("H_DESCRIPTION", $a_descr);
}

+ Here is the caller graph for this function:

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

Show admin view button.

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

{
$this->edit_page_button =
array("link" => $a_link, "txt" => $a_txt, "frame" => $a_frame);
}
ilTemplate::setFrameFixedWidth (   $a_value)

Restrict content frame to fixed width (will be centered on screen)

Parameters
bool$a_value

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

{
$this->frame_fixed_width = (bool)$a_value;
}
ilTemplate::setFullscreenHeader (   $a_title,
  $a_description = null,
  $a_icon = null,
  $a_img = null,
  $a_bg_color = null,
  $a_font_color = null,
  $a_width = 880,
  $a_height = 100,
  $a_export = false 
)

Set fullscreen header data.

Parameters
string$a_title
string$a_description
string$a_iconpath
string$a_imgbanner full path (background image)
string$a_bg_colorhtml color code (page background)
string$a_font_colorhtml color code (title and description)
int$a_widthbanner width
int$a_heightbanner height
bool$a_export

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

References HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), setDescription(), setTitle(), setTitleIcon(), and HTML_Template_IT\setVariable().

{
$this->setTitle(null);
$this->setTitleIcon(null);
$this->setDescription(null);
$this->setVariable("FULLSCREEN_TITLE", $a_title);
if($a_description)
{
$this->setCurrentBlock("fullscreen_descbl");
$this->setVariable("FULLSCREEN_DESCRIPTION", $a_description);
if($a_font_color)
{
$this->setVariable("FULLSCREEN_FONT_COLOR", " style=\"color: #".$a_font_color."\"");
}
}
if($a_icon)
{
$this->setCurrentBlock("fullscreen_iconbl");
$this->setVariable("FULLSCREEN_ICON", $a_icon);
}
if($a_bg_color)
{
$this->setVariable("FRAME_BG_COLOR", " style=\"padding:1px; background-color: #".$a_bg_color."\"");
}
else
{
$this->setVariable("FRAME_BG_COLOR", " style=\"padding:1px;\"");
}
if($a_font_color)
{
$this->setVariable("FULLSCREEN_FONT_COLOR", " style=\"color: #".$a_font_color."\"");
}
if($a_img)
{
if(!$a_export)
{
$a_img = ILIAS_HTTP_PATH."/".$a_img;
}
$this->setCurrentBlock("fullscreen_bannerbl");
$this->setVariable("FULLSCREEN_BANNER_WIDTH", $a_width);
$this->setVariable("FULLSCREEN_BANNER_HEIGHT", $a_height);
$this->setVariable("FULLSCREEN_BG", " background-image: url(".$a_img.")");
}
}

+ Here is the call graph for this function:

ilTemplate::setHeaderActionMenu (   $a_header)

Set header action menu.

Parameters
string$a_gui$a_header

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

Referenced by resetHeaderBlock().

{
$this->header_action = $a_header;
}

+ Here is the caller graph for this function:

ilTemplate::setHeaderPageTitle (   $a_title)

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

References ilUtil\stripScriptHTML().

{
$a_title = ilUtil::stripScriptHTML($a_title);
$this->header_page_title = $a_title;
}

+ Here is the call graph for this function:

ilTemplate::setLeftContent (   $a_html)

sets content of left column

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

{
$this->left_content = $a_html;
}
ilTemplate::setLeftNavContent (   $a_content)

Sets content of left navigation column.

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

{
$this->left_nav_content = $a_content;
}
ilTemplate::setLocator ( )

Insert locator.

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

References $lng, and HTML_Template_IT\setVariable().

{
global $ilLocator, $lng, $ilPluginAdmin;
$html = "";
if (is_object($ilPluginAdmin))
{
include_once("./Services/UIComponent/classes/class.ilUIHookProcessor.php");
$uip = new ilUIHookProcessor("Services/Locator", "main_locator",
array("locator_gui" => $ilLocator));
if (!$uip->replaced())
{
$html = $ilLocator->getHTML();
}
$html = $uip->getHTML($html);
}
else
{
$html = $ilLocator->getHTML();
}
$this->setVariable("LOCATOR", $html);
}

+ Here is the call graph for this function:

ilTemplate::setLoginTargetPar (   $a_val)

Set target parameter for login (public sector).

This is used by the main menu

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

{
$this->login_target_par = $a_val;
}
ilTemplate::setMessage (   $a_type,
  $a_txt,
  $a_keep = false 
)

Set message.

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

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

References $_SESSION.

{
if (!in_array($a_type, array("info", "success", "failure", "question")) || $a_txt == "")
{
return;
}
if ($a_type == "question")
{
$a_type = "mess_question";
}
if (!$a_keep)
{
$this->message[$a_type] = $a_txt;
}
else
{
$_SESSION[$a_type] = $a_txt;
}
}
ilTemplate::setMessage (   $a_type,
  $a_txt,
  $a_keep = false 
)

Set message.

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

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

References ilSession\set().

{
if (!in_array($a_type, array("info", "success", "failure", "question")) || $a_txt == "")
{
return;
}
if ($a_type == "question")
{
$a_type = "mess_question";
}
if (!$a_keep)
{
$this->message[$a_type] = $a_txt;
}
else
{
ilSession::set($a_type, $a_txt);
}
}

+ Here is the call graph for this function:

ilTemplate::setMountWebfolderIcon (   $a_ref_id)

shows icon for mounting a webfolder

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

References $lng.

{
global $lng;
$this->mount_webfolder = $a_ref_id;
}
ilTemplate::setNewContentStyleSheetLocation (   $a_stylesheet)

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

References HTML_Template_IT\setVariable().

{
$this->setVariable("LOCATION_NEWCONTENT_STYLESHEET", $a_stylesheet);
}

+ Here is the call graph for this function:

ilTemplate::setPageActions (   $a_page_actions_html)

Show admin view button.

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

{
$this->page_actions = $a_page_actions_html;
}
ilTemplate::setPageFormAction (   $a_action)

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

Referenced by setCreationSelector().

{
$this->page_form_action = $a_action;
}

+ Here is the caller graph for this function:

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

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

{
$this->permanent_link = array(
"type" => $a_type,
"id" => $a_id,
"append" => $a_append,
"target" => $a_target);
}
ilTemplate::setRightContent (   $a_html)

sets content of right column

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

{
$this->right_content = $a_html;
}
ilTemplate::setStyleSheetLocation (   $a_stylesheet)

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

References HTML_Template_IT\setVariable().

{
$this->setVariable("LOCATION_STYLESHEET", $a_stylesheet);
}

+ Here is the call graph for this function:

ilTemplate::setSubTabs (   $a_tabs_html)

sets subtabs in standard template

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

References HTML_Template_IT\setVariable().

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

+ Here is the call graph for this function:

ilTemplate::setTabs (   $a_tabs_html)

sets tabs in standard template

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

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

{
if ($a_tabs_html != "" && $this->blockExists("tabs_outer_start"))
{
$this->touchBlock("tabs_outer_start");
$this->touchBlock("tabs_outer_end");
$this->touchBlock("tabs_inner_start");
$this->touchBlock("tabs_inner_end");
$this->setVariable("TABS", $a_tabs_html);
}
}

+ Here is the call graph for this function:

ilTemplate::setTitle (   $a_title)

sets title in standard template

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

References ilUtil\stripScriptHTML().

Referenced by resetHeaderBlock(), and setFullscreenHeader().

{
$this->title = ilUtil::stripScriptHTML($a_title);
$this->header_page_title = $a_title;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

set title icon

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

Referenced by resetHeaderBlock(), and setFullscreenHeader().

{
$this->icon_desc = $a_icon_desc;
$this->icon_path = $a_icon_path;
}

+ Here is the caller graph for this function:

ilTemplate::setTopBar (   $a_back_url = null)

Add top toolbar.

Parameters
string$a_back_url

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

References $ilUser, $lng, ilMainMenuGUI\getLanguageSelection(), HTML_Template_IT\parseCurrentBlock(), setCurrentBlock(), and HTML_Template_IT\setVariable().

{
global $lng, $ilUser;
// fallback: desktop overview
if(!$a_back_url && $ilUser->getId() != ANONYMOUS_USER_ID)
{
$a_back_url = "./ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToSelectedItems";
}
if($a_back_url)
{
$this->setCurrentBlock("topbar_backlink");
$this->setVariable("TOPBAR_BACK_URL", $a_back_url);
$this->setVariable("TOPBAR_BACK", "&laquo; ".$lng->txt("back"));
}
// user name
if($ilUser->getId() != ANONYMOUS_USER_ID)
{
$this->setCurrentBlock("topbar_usr_reg");
$this->setVariable("TOPBAR_USER", $ilUser->getFullname());
}
// not logged in
else
{
include_once "Services/MainMenu/classes/class.ilMainMenuGUI.php";
$this->setCurrentBlock("topbar_usr_ano");
$this->setVariable("TOPBAR_LANGUAGES", $selection);
$this->setVariable("TOPBAR_LOGIN_CAPTION", $lng->txt("login_to_ilias"));
$this->setVariable("TOPBAR_LOGIN_URL", "./login.php?client_id=".CLIENT_ID."&cmd=force_login");
}
// $this->touchBlock("fullscreen_topbar");
}

+ Here is the call graph for this function:

ilTemplate::setTreeFlatIcon (   $a_link,
  $a_mode 
)

set tree/flat icon

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

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

References $lng.

{
global $lng;
$this->tree_flat_link = $a_link;
$this->tree_flat_mode = $a_mode;
}
ilTemplate::setUpperIcon (   $a_link,
  $a_frame = "" 
)

sets icon to upper level

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

References $lng.

{
global $lng;
$this->upper_icon = $a_link;
$this->upper_icon_frame = $a_frame;
}
ilTemplate::show (   $part = "DEFAULT")

public

Parameters
string

Reimplemented from HTML_Template_IT.

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

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

{
header('Content-type: text/html; charset=UTF-8');
// ERROR HANDLER SETS $_GET["message"] IN CASE OF $error_obj->MESSAGE
$ms = array("info", "success", "failure", "question");
$out = "";
foreach ($ms as $m)
{
if ($m == "question")
{
$m = "mess_question";
}
$txt = (ilSession::get($m) != "")
: $this->message[$m];
if ($m == "mess_question")
{
$m = "question";
}
if ($txt != "")
{
$out.= $this->getMessageHTML($txt, $m);
}
if ($m == "question")
{
$m = "mess_question";
}
if (ilSession::get($m))
{
}
}
if ($this->blockExists("MESSAGE") && $out != "")
{
$this->setVariable("MESSAGE", $out);
}
if ($part == "DEFAULT")
{
}
else
{
parent::show($part);
}
if (((substr(strrchr($_SERVER["PHP_SELF"],"/"),1) != "error.php")
&& (substr(strrchr($_SERVER["PHP_SELF"],"/"),1) != "adm_menu.php")))
{
ilSession::set("post_vars", $_POST);
// referer is modified if query string contains cmd=gateway and $_POST is not empty.
// this is a workaround to display formular again in case of error and if the referer points to another page
$url_parts = parse_url($_SERVER["REQUEST_URI"]);
if(!$url_parts)
{
$protocol = (isset($_SERVER['HTTPS']) ? 'https' : 'http').'://';
$host = $_SERVER['HTTP_HOST'];
$path = $_SERVER['REQUEST_URI'];
$url_parts = @parse_url($protocol.$host.$path);
}
if (preg_match("/cmd=gateway/",$url_parts["query"]))
{
foreach ($_POST as $key => $val)
{
if (is_array($val))
{
$val = key($val);
}
$str .= "&".$key."=".$val;
}
ilSession::set("referer",
preg_replace("/cmd=gateway/",substr($str,1),$_SERVER["REQUEST_URI"]));
ilSession::set("referer_ref_id",
(int) $_GET['ref_id']);
}
else
{
ilSession::set("referer", $_SERVER["REQUEST_URI"]);
ilSession::set("referer_ref_id",
(int) $_GET['ref_id']);
}
ilSession::clear("error_post_vars");
}
}

+ Here is the call graph for this function:

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

References $tpl, 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(), get(), getContentType(), getMainMenu(), ilPluginAdmin\getPluginObject(), getTabsHTML(), handleReferer(), IL_COMP_SERVICE, ilYuiUtil\initDom(), initHelp(), ilUIHookPluginGUI\KEEP, HTML_Template_IT\parseCurrentBlock(), setCenterColumnClass(), setCurrentBlock(), and variableExists().

Referenced by show().

{
global $ilias, $ilTabs;
// include yahoo dom per default
include_once("./Services/YUI/classes/class.ilYuiUtil.php");
//echo "-".ilUtil::getP3PLocation()."-";
//header('P3P: policyref="'.ilUtil::getP3PLocation().
// '", CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"');
header('P3P: CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"');
header("Content-type: " . $this->getContentType() . "; charset=UTF-8");
$this->fillMessage();
// display ILIAS footer
if ($part !== false)
{
$this->addILIASFooter();
}
// set standard parts (tabs and title icon)
$this->fillBodyClass();
if ($a_fill_tabs)
{
if ($this->blockExists("content"))
{
// determine default screen id
$this->getTabsHTML();
}
// to get also the js files for the main menu
if (!$a_skip_main_menu)
{
$this->getMainMenu();
$this->initHelp();
}
if($this->blockExists("content") && $this->variableExists('MAINMENU'))
{
global $tpl;
include_once 'Services/Authentication/classes/class.ilSessionReminderGUI.php';
$session_reminder_gui = new ilSessionReminderGUI(ilSessionReminder::createInstanceWithCurrentUserSession());
$tpl->setVariable('SESSION_REMINDER', $session_reminder_gui->getHtml());
}
// these fill blocks in tpl.main.html
$this->fillCssFiles();
$this->fillInlineCss();
//$this->fillJavaScriptFiles();
$this->fillContentStyle();
// these fill just plain placeholder variables in tpl.main.html
$this->setCurrentBlock("DEFAULT");
$this->fillWindowTitle();
// these fill blocks in tpl.adm_content.html
$this->fillHeader();
$this->fillSideIcons();
$this->fillStopFloating();
$this->fillLeftContent();
$this->fillLeftNav();
$this->fillRightContent();
$this->fillAdminPanel();
$this->fillToolbar();
// late loading of javascipr files, since operations above may add files
$this->fillOnLoadCode();
// these fill just plain placeholder variables in tpl.adm_content.html
// these fill just plain placeholder variables in tpl.adm_content.html
if ($this->blockExists("content"))
{
$this->setCurrentBlock("content");
$this->fillTabs();
$this->fillMainContent();
$this->fillMainMenu();
$this->fillLightbox();
}
}
if ($part == "DEFAULT" or is_bool($part))
{
$html = parent::get();
}
else
{
$html = parent::get($part);
}
// include the template output hook
global $ilPluginAdmin;
$pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
foreach ($pl_names as $pl)
{
$ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
$gui_class = $ui_plugin->getUIClassInstance();
$resp = $gui_class->getHTML("", "template_show",
array("tpl_id" => $this->tplIdentifier, "tpl_obj" => $this, "html" => $html));
if ($resp["mode"] != ilUIHookPluginGUI::KEEP)
{
$html = $gui_class->modifyHTML($html, $resp);
}
}
print $html;
$this->handleReferer();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::stopTitleFloating ( )

set stop floating (if no tabs are used)

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

{
$this->stop_floating = true;
}
ilTemplate::touchBlock (   $block)

overwrites ITX::touchBlock.

public

Parameters
string
Returns
???

Reimplemented from HTML_Template_IT.

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

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

{
$this->setCurrentBlock($block);
//$count = $this->fillVars();
if ($count == 0)
{
}
}

+ Here is the call graph for this function:

ilTemplate::touchBlock (   $block)

overwrites ITX::touchBlock.

public

Parameters
string
Returns
???

Reimplemented from HTML_Template_IT.

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

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

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

{
$this->setCurrentBlock($block);
$count = $this->fillVars();
if ($count == 0)
{
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilTemplate::variableExists (   $a_variablename)
private

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

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

{
return (isset($this->blockvariables["content"][$a_variablename]) ? true : false);
}

+ Here is the caller graph for this function:

Field Documentation

ilTemplate::$activeBlock

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

Referenced by parseCurrentBlock().

ilTemplate::$addFooter
private

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

Referenced by getAddFooter().

ilTemplate::$admin_panel_commands = array()

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

ilTemplate::$content_style_sheet = ""
protected

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

ilTemplate::$contenttype

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

Referenced by getContentType().

ilTemplate::$creation_selector = false
protected

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

Referenced by fillAdminPanel().

ilTemplate::$css_files = array()

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

ilTemplate::$frame_fixed_width = false
protected

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

ilTemplate::$header_action
protected

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

Referenced by getHeaderActionMenu().

ilTemplate::$il_cache = array()
staticprotected

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

ilTemplate::$inline_css = array()

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

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

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

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

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

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

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

ilTemplate::$lightbox = array()
protected

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

ilTemplate::$message = ""
protected

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

ilTemplate::$mount_webfolder = ""
protected

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

Referenced by fillSideIcons().

ilTemplate::$page_actions = array()
protected

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

ilTemplate::$page_form_action = ""
protected

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

ilTemplate::$permanent_link = false
protected

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

ilTemplate::$stop_floating = ""
protected

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

ilTemplate::$title_alerts = array()
protected

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

ilTemplate::$title_desc = ""
protected

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

ilTemplate::$tree_flat_link = ""
protected

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

ilTemplate::$upper_icon = ""
protected

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

ilTemplate::$vars

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

Referenced by prepareForFormular().


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