ILIAS
Release_3_10_x_branch Revision 61812
|
special template class to simplify handling of ITX/PEAR More...
Public Member Functions | |
ilTemplate ($file, $flag1, $flag2, $in_module=false, $vars="DEFAULT", $plugin=false) | |
constructor | |
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) | |
??? public | |
addErrorMessage () | |
getContentType () | |
Get the content type for the template output. | |
setContentType ($a_content_type="text/html") | |
Set the content type for the template output. | |
show ($part="DEFAULT", $a_fill_tabs=true) | |
public | |
fillContentLanguage () | |
Add current user language to meta tags. | |
fillWindowTitle () | |
fillTabs () | |
fillPageFormAction () | |
fillJavaScriptFiles () | |
fillCssFiles () | |
setContentStyleSheet ($a_style) | |
Set content style (used for page content editor) | |
fillContentStyle () | |
Fill Content Style. | |
getMainMenu () | |
fillMainMenu () | |
fillHeaderIcon () | |
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 | |
getTemplatePath ($a_tplname, $a_in_module=false, $a_plugin=false) | |
builds a full template path with template and module name | |
setHeaderPageTitle ($a_title) | |
setStyleSheetLocation ($a_stylesheet) | |
setNewContentStyleSheetLocation ($a_stylesheet) | |
getStandardTemplate () | |
setTitle ($a_title) | |
sets title in standard template | |
setTitleIcon ($a_icon_path, $a_icon_desc="") | |
set title icon | |
setPageFormAction ($a_action) | |
setDescription ($a_descr) | |
sets title in standard template | |
stopTitleFloating () | |
set stop floating (if no tabs are used) | |
setContent ($a_html) | |
sets content for standard template | |
setRightContent ($a_html) | |
sets content of right column | |
setLeftContent ($a_html) | |
sets content of left 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 | |
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) | |
Add a javascript file that should be included in the header. | |
addCss ($a_css_file, $media="screen") | |
Add a css file that should be included in the header. | |
setCreationSelector ($a_form_action, $a_options, $a_command, $a_txt) | |
Set selection and create button for adding new objects. | |
setAdminViewButton ($a_link, $a_txt) | |
Show admin view button. | |
setEditPageButton ($a_link, $a_txt, $a_frame) | |
Show admin view button. | |
addAdminPanelCommand ($a_cmd, $a_txt) | |
Add a command to the admin panel. | |
fillAdminPanel () | |
Put admin panel into template: | |
setPermanentLink ($a_type, $a_id, $a_append="", $a_target="") | |
fillPermanentLink () | |
Fill in permanent link. | |
ilTemplate ($root) | |
constructor | |
show ($part="DEFAULT") | |
public | |
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 () | |
Public Member Functions inherited from ilTemplateX | |
callConstructor () | |
callConstructor () |
Data Fields | |
$contenttype | |
$vars | |
$activeBlock | |
$js_files = array(0 => "Services/JavaScript/js/Basic.js") | |
$js_files_vp = array("Services/JavaScript/js/Basic.js" => true) | |
$css_files = array() | |
$admin_panel_commands = array() |
Private Member Functions | |
fillNewContentStyle () | |
Fill Content Style. | |
fillTitle () | |
Fill title. | |
fillStopFloating () | |
stop floating | |
fillMainContent () | |
Fill main content. | |
fillRightContent () | |
Fill right content. | |
fillLeftContent () | |
Fill left content. |
Private Attributes | |
$addFooter |
special template class to simplify handling of ITX/PEAR
Definition at line 31 of file class.ilTemplate.php.
ilTemplate::addAdminPanelCommand | ( | $a_cmd, | |
$a_txt | |||
) |
Add a command to the admin panel.
Definition at line 1388 of file class.ilTemplate.php.
ilTemplate::addBlockFile | ( | $var, | |
$block, | |||
$tplname, | |||
$in_module = false |
|||
) |
overwrites ITX::addBlockFile public
string | ||
string | ||
string | $tplname | template name |
boolean | $in_module | should be set to true, if template file is in module subdirectory |
Definition at line 985 of file class.ilTemplate.php.
References getTemplatePath().
Referenced by addErrorMessage(), addILIASFooter(), getStandardTemplate(), and show().
ilTemplate::addCss | ( | $a_css_file, | |
$media = "screen" |
|||
) |
Add a css file that should be included in the header.
Definition at line 1345 of file class.ilTemplate.php.
ilTemplate::addErrorMessage | ( | ) |
Definition at line 231 of file class.ilTemplate.php.
References $_SESSION, addBlockFile(), and blockExists().
Referenced by get(), and show().
ilTemplate::addILIASFooter | ( | ) |
add ILIAS footer
Definition at line 533 of file class.ilTemplate.php.
References $_GET, $_SESSION, $d, $GLOBALS, $ilBench, $ilCtrl, $ilSetting, $total, ilObjLanguageAccess\_checkTranslate(), ilObjLanguageExtGUI\_getTranslationLink(), addBlockFile(), ilUtil\appendUrlParameterString(), blockExists(), ilPHP\cloneObject(), DB_FETCHMODE_ASSOC, getAddFooter(), parseCurrentBlock(), setCurrentBlock(), ilUtil\sortArray(), and ilValidatorAdapter\validate().
Referenced by get(), and show().
ilTemplate::addJavaScript | ( | $a_js_file | ) |
Add a javascript file that should be included in the header.
Definition at line 150 of file class.ilTemplate.php.
ilTemplate::addJavaScript | ( | $a_js_file, | |
$a_add_version_parameter = true |
|||
) |
Add a javascript file that should be included in the header.
Definition at line 1333 of file class.ilTemplate.php.
ilTemplate::blockExists | ( | $a_blockname | ) |
check if block exists in actual template private
string | blockname |
Definition at line 142 of file class.ilTemplate.php.
ilTemplate::blockExists | ( | $a_blockname | ) |
check if block exists in actual template private
string | blockname |
Definition at line 743 of file class.ilTemplate.php.
Referenced by addErrorMessage(), addILIASFooter(), fillJavaScriptFiles(), get(), and show().
ilTemplate::checkTopic | ( | $a_block, | |
$a_topic | |||
) |
checks for a topic in the template private
string | |
string |
Definition at line 940 of file class.ilTemplate.php.
Referenced by includeNavigation(), and includeTree().
ilTemplate::fileExists | ( | $filename | ) |
check if a file exists public
Definition at line 970 of file class.ilTemplate.php.
References $filename.
ilTemplate::fillAdminPanel | ( | ) |
Put admin panel into template:
Definition at line 1399 of file class.ilTemplate.php.
References $cmd, $lng, ilUtil\getImagePath(), parseCurrentBlock(), and setCurrentBlock().
Referenced by get(), and show().
ilTemplate::fillContentLanguage | ( | ) |
Add current user language to meta tags.
public
Definition at line 359 of file class.ilTemplate.php.
References $lng.
Referenced by get(), and show().
ilTemplate::fillContentStyle | ( | ) |
Fill Content Style.
Definition at line 478 of file class.ilTemplate.php.
References parseCurrentBlock(), and setCurrentBlock().
Referenced by get(), and show().
ilTemplate::fillCssFiles | ( | ) |
Definition at line 451 of file class.ilTemplate.php.
References $filename, parseCurrentBlock(), and setCurrentBlock().
Referenced by get(), and show().
ilTemplate::fillHeaderIcon | ( | ) |
Definition at line 514 of file class.ilTemplate.php.
References parseCurrentBlock(), and setCurrentBlock().
Referenced by get(), and show().
ilTemplate::fillJavaScriptFiles | ( | ) |
Definition at line 158 of file class.ilTemplate.php.
References $file, blockExists(), parseCurrentBlock(), and setCurrentBlock().
ilTemplate::fillJavaScriptFiles | ( | ) |
Definition at line 420 of file class.ilTemplate.php.
References $file, $ilSetting, ilUtil\appendUrlParameterString(), blockExists(), parseCurrentBlock(), and setCurrentBlock().
Referenced by get(), and show().
|
private |
Fill left content.
Definition at line 1192 of file class.ilTemplate.php.
References parseCurrentBlock(), and setCurrentBlock().
Referenced by get(), and show().
|
private |
Fill main content.
Definition at line 1152 of file class.ilTemplate.php.
Referenced by get(), and show().
ilTemplate::fillMainMenu | ( | ) |
|
private |
Fill Content Style.
Definition at line 492 of file class.ilTemplate.php.
References ilUtil\getNewContentStyleSheetLocation().
Referenced by get(), and show().
ilTemplate::fillPageFormAction | ( | ) |
Definition at line 409 of file class.ilTemplate.php.
References parseCurrentBlock(), setCurrentBlock(), and touchBlock().
Referenced by get(), and show().
ilTemplate::fillPermanentLink | ( | ) |
Fill in permanent link.
Definition at line 1514 of file class.ilTemplate.php.
Referenced by get(), and show().
|
private |
Fill right content.
Definition at line 1171 of file class.ilTemplate.php.
References parseCurrentBlock(), and setCurrentBlock().
Referenced by get(), and show().
ilTemplate::fillSideIcons | ( | ) |
Fill side icons (upper icon, tree icon, webfolder icon)
Definition at line 1242 of file class.ilTemplate.php.
References $lng, ilFrameTargetInfo\_getFrame(), ilUtil\getImagePath(), parseCurrentBlock(), and setCurrentBlock().
Referenced by get(), and show().
|
private |
stop floating
Definition at line 1130 of file class.ilTemplate.php.
References touchBlock().
Referenced by get(), and show().
ilTemplate::fillTabs | ( | ) |
Definition at line 401 of file class.ilTemplate.php.
Referenced by get(), and show().
|
private |
Fill title.
Definition at line 1089 of file class.ilTemplate.php.
Referenced by get(), and show().
ilTemplate::fillVars | ( | ) |
all template vars defined in $vars will be replaced automatically without setting and parsing them with setVariable & parseCurrentBlock private
Definition at line 755 of file class.ilTemplate.php.
Referenced by parseCurrentBlock(), and touchBlock().
ilTemplate::fillWindowTitle | ( | ) |
Definition at line 380 of file class.ilTemplate.php.
References $ilSetting.
Referenced by get(), and show().
ilTemplate::get | ( | $part = "DEFAULT" , |
|
$add_error_mess = false , |
|||
$handle_referer = false , |
|||
$add_ilias_footer = false , |
|||
$add_standard_elements = false |
|||
) |
??? public
string |
Definition at line 162 of file class.ilTemplate.php.
References addErrorMessage(), addILIASFooter(), blockExists(), fillAdminPanel(), fillContentLanguage(), fillContentStyle(), fillCssFiles(), fillHeaderIcon(), fillJavaScriptFiles(), fillLeftContent(), fillMainContent(), fillMainMenu(), fillNewContentStyle(), fillPageFormAction(), fillPermanentLink(), fillRightContent(), fillSideIcons(), fillStopFloating(), fillTabs(), fillTitle(), fillWindowTitle(), getMainMenu(), handleReferer(), parseCurrentBlock(), and setCurrentBlock().
ilTemplate::getAddFooter | ( | ) |
Definition at line 140 of file class.ilTemplate.php.
References $addFooter.
Referenced by addILIASFooter().
ilTemplate::getAsynch | ( | ) |
Use this for final get before sending asynchronous output (ajax) per echo to output.
Definition at line 150 of file class.ilTemplate.php.
References getContentType().
ilTemplate::getContentType | ( | ) |
Get the content type for the template output.
Definition at line 258 of file class.ilTemplate.php.
References $contenttype.
Referenced by getAsynch(), and show().
ilTemplate::getMainMenu | ( | ) |
Definition at line 500 of file class.ilTemplate.php.
Referenced by get(), and show().
ilTemplate::getStandardTemplate | ( | ) |
Definition at line 1071 of file class.ilTemplate.php.
References addBlockFile().
ilTemplate::getTemplatePath | ( | $a_tplname, | |
$a_in_module = false , |
|||
$a_plugin = false |
|||
) |
builds a full template path with template and module name
string | $a_tplname | template name |
boolean | $in_module | should be set to true, if template file is in module subdirectory |
Definition at line 1010 of file class.ilTemplate.php.
References $_GET, $ilCtrl, and ILIAS_MODULE.
Referenced by addBlockFile(), and ilTemplate().
ilTemplate::handleReferer | ( | ) |
TODO: this is nice, but shouldn't be done here (-> maybe at the end of ilias.php!?, alex)
Definition at line 688 of file class.ilTemplate.php.
References $_SESSION.
Referenced by get(), and show().
ilTemplate::ilTemplate | ( | $root | ) |
constructor
string | $file | templatefile (mit oder ohne pfad) |
boolean | $flag1 | remove unknown variables |
boolean | $flag2 | remove empty blocks |
boolean | $in_module | should be set to true, if template file is in module subdirectory |
array | $vars | variables to replace public |
Definition at line 59 of file class.ilTemplate.php.
References ilTemplateX\callConstructor().
ilTemplate::ilTemplate | ( | $file, | |
$flag1, | |||
$flag2, | |||
$in_module = false , |
|||
$vars = "DEFAULT" , |
|||
$plugin = false |
|||
) |
constructor
string | $file | templatefile (mit oder ohne pfad) |
boolean | $flag1 | remove unknown variables |
boolean | $flag2 | remove empty blocks |
boolean | $in_module | should be set to true, if template file is in module subdirectory |
array | $vars | variables to replace public |
Definition at line 68 of file class.ilTemplate.php.
References $file, ilTemplateX\callConstructor(), and getTemplatePath().
ilTemplate::includeNavigation | ( | ) |
check if there is a NAVIGATION-topic public
Definition at line 950 of file class.ilTemplate.php.
References checkTopic().
ilTemplate::includeTree | ( | ) |
check if there is a TREE-topic public
Definition at line 960 of file class.ilTemplate.php.
References checkTopic().
ilTemplate::parseCurrentBlock | ( | $part = "DEFAULT" | ) |
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public.
string |
Definition at line 820 of file class.ilTemplate.php.
References $activeBlock, and fillVars().
Referenced by addILIASFooter(), fillAdminPanel(), fillContentStyle(), fillCssFiles(), fillHeaderIcon(), fillJavaScriptFiles(), fillLeftContent(), fillPageFormAction(), fillRightContent(), fillSideIcons(), get(), replaceFromDatabase(), show(), and touchBlock().
ilTemplate::prepareForFormular | ( | $vars | ) |
Wird angewendet, wenn die Daten in ein Formular replaced werden sollen, Dann wird erst noch ein htmlspecialchars drumherum gemacht.
public
string |
Definition at line 892 of file class.ilTemplate.php.
References $vars.
ilTemplate::replace | ( | ) |
??? public
Definition at line 914 of file class.ilTemplate.php.
Referenced by replaceDefault(), and replaceFromDatabase().
ilTemplate::replaceDefault | ( | ) |
??? public
Definition at line 928 of file class.ilTemplate.php.
References replace().
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
string | |
string | |
string | |
string |
Definition at line 858 of file class.ilTemplate.php.
References $res, $result, parseCurrentBlock(), replace(), and setCurrentBlock().
ilTemplate::setAddFooter | ( | $value | ) |
Definition at line 130 of file class.ilTemplate.php.
ilTemplate::setAdminViewButton | ( | $a_link, | |
$a_txt | |||
) |
Show admin view button.
Definition at line 1370 of file class.ilTemplate.php.
ilTemplate::setContent | ( | $a_html | ) |
sets content for standard template
Definition at line 1141 of file class.ilTemplate.php.
ilTemplate::setContentStyleSheet | ( | $a_style | ) |
Set content style (used for page content editor)
Definition at line 470 of file class.ilTemplate.php.
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
string | $a_content_type | Content type public |
Definition at line 273 of file class.ilTemplate.php.
ilTemplate::setCreationSelector | ( | $a_form_action, | |
$a_options, | |||
$a_command, | |||
$a_txt | |||
) |
Set selection and create button for adding new objects.
Definition at line 1356 of file class.ilTemplate.php.
References setPageFormAction().
ilTemplate::setCurrentBlock | ( | $part = "DEFAULT" | ) |
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
public
string |
Definition at line 782 of file class.ilTemplate.php.
Referenced by addILIASFooter(), fillAdminPanel(), fillContentStyle(), fillCssFiles(), fillHeaderIcon(), fillJavaScriptFiles(), fillLeftContent(), fillPageFormAction(), fillRightContent(), fillSideIcons(), get(), replaceFromDatabase(), show(), and touchBlock().
ilTemplate::setDescription | ( | $a_descr | ) |
sets title in standard template
Definition at line 1114 of file class.ilTemplate.php.
ilTemplate::setEditPageButton | ( | $a_link, | |
$a_txt, | |||
$a_frame | |||
) |
Show admin view button.
Definition at line 1379 of file class.ilTemplate.php.
ilTemplate::setHeaderPageTitle | ( | $a_title | ) |
Definition at line 1056 of file class.ilTemplate.php.
ilTemplate::setLeftContent | ( | $a_html | ) |
sets content of left column
Definition at line 1184 of file class.ilTemplate.php.
ilTemplate::setLocator | ( | ) |
ilTemplate::setMountWebfolderIcon | ( | $a_ref_id | ) |
shows icon for mounting a webfolder
Definition at line 1309 of file class.ilTemplate.php.
References $lng.
ilTemplate::setNewContentStyleSheetLocation | ( | $a_stylesheet | ) |
Definition at line 1066 of file class.ilTemplate.php.
ilTemplate::setPageFormAction | ( | $a_action | ) |
Definition at line 1106 of file class.ilTemplate.php.
Referenced by setCreationSelector().
ilTemplate::setPermanentLink | ( | $a_type, | |
$a_id, | |||
$a_append = "" , |
|||
$a_target = "" |
|||
) |
Definition at line 1502 of file class.ilTemplate.php.
ilTemplate::setRightContent | ( | $a_html | ) |
sets content of right column
Definition at line 1163 of file class.ilTemplate.php.
ilTemplate::setStyleSheetLocation | ( | $a_stylesheet | ) |
Definition at line 1061 of file class.ilTemplate.php.
ilTemplate::setSubTabs | ( | $a_tabs_html | ) |
sets subtabs in standard template
Definition at line 1223 of file class.ilTemplate.php.
ilTemplate::setTabs | ( | $a_tabs_html | ) |
sets tabs in standard template
Definition at line 1215 of file class.ilTemplate.php.
ilTemplate::setTitle | ( | $a_title | ) |
sets title in standard template
Definition at line 1080 of file class.ilTemplate.php.
ilTemplate::setTitleIcon | ( | $a_icon_path, | |
$a_icon_desc = "" |
|||
) |
set title icon
Definition at line 1100 of file class.ilTemplate.php.
ilTemplate::setTreeFlatIcon | ( | $a_link, | |
$a_mode | |||
) |
set tree/flat icon
string | link target |
strong | mode ("tree" | "flat") |
Definition at line 1322 of file class.ilTemplate.php.
References $lng.
ilTemplate::setUpperIcon | ( | $a_link, | |
$a_frame = "" |
|||
) |
ilTemplate::show | ( | $part = "DEFAULT" | ) |
public
string |
Definition at line 72 of file class.ilTemplate.php.
References $_SESSION, addBlockFile(), blockExists(), fillJavaScriptFiles(), and show().
ilTemplate::show | ( | $part = "DEFAULT" , |
|
$a_fill_tabs = true |
|||
) |
public
string | |
bool | fill template variable {TABS} with content of ilTabs |
Definition at line 283 of file class.ilTemplate.php.
References addErrorMessage(), addILIASFooter(), blockExists(), fillAdminPanel(), fillContentLanguage(), fillContentStyle(), fillCssFiles(), fillHeaderIcon(), fillJavaScriptFiles(), fillLeftContent(), fillMainContent(), fillMainMenu(), fillNewContentStyle(), fillPageFormAction(), fillPermanentLink(), fillRightContent(), fillSideIcons(), fillStopFloating(), fillTabs(), fillTitle(), fillWindowTitle(), getContentType(), getMainMenu(), handleReferer(), parseCurrentBlock(), and setCurrentBlock().
Referenced by show().
ilTemplate::stopTitleFloating | ( | ) |
set stop floating (if no tabs are used)
Definition at line 1122 of file class.ilTemplate.php.
ilTemplate::touchBlock | ( | $block | ) |
overwrites ITX::touchBlock.
public
string |
Definition at line 802 of file class.ilTemplate.php.
References fillVars(), parseCurrentBlock(), and setCurrentBlock().
Referenced by fillPageFormAction(), and fillStopFloating().
ilTemplate::$activeBlock |
Definition at line 50 of file class.ilTemplate.php.
Referenced by parseCurrentBlock().
|
private |
Definition at line 57 of file class.ilTemplate.php.
Referenced by getAddFooter().
ilTemplate::$admin_panel_commands = array() |
Definition at line 55 of file class.ilTemplate.php.
ilTemplate::$contenttype |
Definition at line 37 of file class.ilTemplate.php.
Referenced by getContentType().
ilTemplate::$css_files = array() |
Definition at line 54 of file class.ilTemplate.php.
ilTemplate::$js_files = array(0 => "Services/JavaScript/js/Basic.js") |
Definition at line 52 of file class.ilTemplate.php.
ilTemplate::$js_files_vp = array("Services/JavaScript/js/Basic.js" => true) |
Definition at line 53 of file class.ilTemplate.php.
ilTemplate::$vars |
Definition at line 42 of file class.ilTemplate.php.
Referenced by prepareForFormular().