ILIAS
trunk Revision v11.0_alpha-2638-g80c1d007f79
|
Public Member Functions | |
getFile (string $filename) | |
Reads a file from disk and returns its content. More... | |
loadTemplatefile (string $filename, bool $removeUnknownVariables=true, bool $removeEmptyBlocks=true) | |
Reads a template file from the disk. More... | |
get (?string $part=null) | |
![]() | |
__construct (string $file, bool $flag1, bool $flag2, string $in_module="", string $vars=ilGlobalTemplateInterface::DEFAULT_BLOCK, bool $plugin=false, bool $a_use_cache=true) | |
constructor ilTemplate constructor. More... | |
blockExists (string $a_blockname) | |
get (string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK) | |
getUnmodified (string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK) | |
setCurrentBlock (string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK) | |
touchBlock (string $block) | |
parseCurrentBlock (string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK) | |
addBlockFile (string $var, string $block, string $tplname, ?string $in_module=null) | |
loadTemplatefile (string $filename, bool $removeUnknownVariables=true, bool $removeEmptyBlocks=true) | |
getTemplateIdentifier (string $a_tplname, ?string $a_in_module=null) | |
get a unique template identifier The identifier is common for default or customized skins but distincts templates of different services with the same name. More... | |
variableExists (string $a_variablename) | |
![]() | |
__construct (string $root='') | |
Builds some complex regexps and calls the constructor of the parent class. More... | |
replaceBlock (string $block, string $template, bool $keep_content=false) | |
Replaces an existing block with new content. More... | |
addBlock (string $placeholder, string $blockname, string $template) | |
Adds a block to the template changing a variable placeholder to a block placeholder. More... | |
addBlockfile (string $placeholder, string $blockname, string $filename) | |
Adds a block taken from a file to the template changing a variable placeholder to a block placeholder. More... | |
removeBlockData (string $block) | |
Recursively removes all data assiciated with a block, including all inner blocks. More... | |
blockExists (string $blockname) | |
Checks wheter a block exists. More... | |
buildFunctionlist () | |
Builds a functionlist from the template. More... | |
getValue (string $code, $delimiter) | |
Truncates the given code from the first occurence of $delimiter but ignores $delimiter enclosed by " or '. More... | |
deleteFromBlockvariablelist (string $block, $variables) | |
Deletes one or many variables from the block variable list. More... | |
updateBlockvariablelist (string $block) | |
Updates the variable list of a block. More... | |
findPlaceholderBlocks (string $variable) | |
Returns an array of blocknames where the given variable placeholder is used. More... | |
warning (string $message, string $file='', int $line=0) | |
Handles warnings, saves them to $warn and prints them or calls die() depending on the flags. More... | |
![]() | |
__construct (string $root='', ?array $options=null) | |
Builds some complex regular expressions and optinally sets the file root directory. More... | |
setOption (string $option, $value) | |
Sets the option for the template class. More... | |
setOptions (array $options) | |
Sets the options for the template class. More... | |
show (string $block=self::IT_DEFAULT_BLOCK) | |
Print a certain block with all replacements done. More... | |
get (string $block=self::IT_DEFAULT_BLOCK) | |
Returns a block with all replacements done. More... | |
parse (string $block=self::IT_DEFAULT_BLOCK, bool $flag_recursion=false) | |
Parses the given block. More... | |
parseCurrentBlock () | |
Parses the current block. More... | |
setVariable ($variable, $value='') | |
Sets a variable value. More... | |
setCurrentBlock (string $block=self::IT_DEFAULT_BLOCK) | |
Sets the name of the current block that is the block where variables are added. More... | |
touchBlock (string $block) | |
Preserves an empty block even if removeEmptyBlocks is true. More... | |
free () | |
Clears all datafields of the object. More... | |
setTemplate (string $template, bool $removeUnknownVariables=true, bool $removeEmptyBlocks=true) | |
Sets the template. More... | |
loadTemplatefile (string $filename, bool $removeUnknownVariables=true, bool $removeEmptyBlocks=true) | |
Reads a template file from the disk. More... | |
setRoot (string $root) | |
Sets the file root. More... | |
buildBlockvariablelist () | |
Build a list of all variables within of a block. More... | |
findBlocks (string $string) | |
Recusively builds a list of all blocks within the template. More... | |
getFile (string $filename) | |
Reads a file from disk and returns its content. More... | |
_addPregDelimiters (string $str) | |
Adds delimiters to a string, so it can be used as a pattern in preg_* functions. More... | |
_preserveOpeningDelimiter (string $str) | |
Replaces an opening delimiter by a special string. More... | |
errorMessage (int $value, string $blockname='') | |
Return a textual error message for a IT error code. More... | |
Additional Inherited Members | |
![]() | |
array | $vars = [] |
variablen die immer in jedem block ersetzt werden sollen More... | |
string | $activeBlock = '' |
Aktueller Block Der wird gemerkt bei der berladenen Funktion setCurrentBlock, damit beim ParseBlock vorher ein replace auf alle Variablen gemacht werden kann, die mit dem BLockname anfangen. More... | |
![]() | |
array | $warn = [] |
Array with all warnings. More... | |
bool | $printWarning = false |
Print warnings? More... | |
bool | $haltOnWarning = false |
Call die() on warning? More... | |
string | $checkblocknameRegExp = '' |
RegExp used to test for a valid blockname. More... | |
string | $functionPrefix = 'func_' |
Functionnameprefix used when searching function calls in the template. More... | |
string | $functionnameRegExp = '[_a-zA-Z]+[A-Za-z_0-9]*' |
Functionname RegExp. More... | |
string | $functionRegExp = '' |
RegExp used to grep function calls in the template. More... | |
array | $functions = [] |
List of functions found in the template. More... | |
array | $callback = [] |
List of callback functions specified by the user. More... | |
![]() | |
const | IT_OK = 1 |
const | IT_ERROR = -1 |
const | IT_TPL_NOT_FOUND = -2 |
const | IT_BLOCK_NOT_FOUND = -3 |
const | IT_BLOCK_DUPLICATE = -4 |
const | IT_UNKNOWN_OPTION = -6 |
const | IT_DEFAULT_BLOCK = '__global__' |
array | $err = [] |
Contains the error objects. More... | |
bool | $clearCache = false |
Clear cache on get()? More... | |
string | $openingDelimiter = '{' |
First character of a variable placeholder ( _{_VARIABLE} ). More... | |
string | $closingDelimiter = '}' |
Last character of a variable placeholder ( {VARIABLE_}_ ). More... | |
string | $blocknameRegExp = '[\.0-9A-Za-z_-]+' |
RegExp matching a block in the template. More... | |
string | $variablenameRegExp = '[\.0-9A-Za-z_-]+' |
RegExp matching a variable placeholder in the template. More... | |
string | $variablesRegExp = '' |
RegExp used to find variable placeholder, filled by the constructor. More... | |
string | $removeVariablesRegExp = '' |
RegExp used to strip unused variable placeholder. More... | |
bool | $removeUnknownVariables = true |
Controls the handling of unknown variables, default is remove. More... | |
bool | $removeEmptyBlocks = true |
Controls the handling of empty blocks, default is remove. More... | |
string | $blockRegExp = '' |
RegExp used to find blocks an their content, filled by the constructor. More... | |
string | $currentBlock = self::IT_DEFAULT_BLOCK |
Name of the current block. More... | |
string | $template = '' |
Content of the template. More... | |
array | $blocklist = [] |
Array of all blocks and their content. More... | |
array | $blockdata = [] |
Array with the parsed content of a block. More... | |
array | $blockvariables = [] |
Array of variables in a block. More... | |
array | $blockparents = [] |
Array of block parents. More... | |
array | $blockinner = [] |
Array of inner blocks of a block. More... | |
array | $touchedBlocks = [] |
List of blocks to preverse even if they are "empty". More... | |
array | $variableCache = [] |
Variable cache. More... | |
bool | $clearCacheOnParse = false |
Clear the variable cache on parse? If you're not an expert just leave the default false. More... | |
string | $fileRoot = '' |
Root directory for all file operations. More... | |
bool | $flagBlocktrouble = false |
Internal flag indicating that a blockname was used multiple times. More... | |
bool | $flagGlobalParsed = false |
Flag indicating that the global block was parsed. More... | |
bool | $flagCacheTemplatefile = true |
EXPERIMENTAL! FIXME! Flag indication that a template gets cached. More... | |
string | $lastTemplatefile = '' |
EXPERIMENTAL! FIXME! More... | |
array | $_options |
$_options['preserve_data'] Whether to substitute variables and remove empty placeholders in data passed through setVariable (see also bugs #20199, #21951). More... | |
![]() | |
init () | |
getCurrentSkin () | |
getCurrentStyle () | |
fileExistsInSkin (string $path) | |
getTemplatePath (string $a_tplname, string $a_in_module='') | |
![]() | |
init () | |
![]() | |
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. More... | |
![]() | |
bool | $il_use_cache |
string | $il_cur_key |
string | $tplName |
string | $tplPath |
string | $tplIdentifier |
![]() | |
array string | $real_filename = '' |
Holds the real template file name. More... | |
![]() | |
static array | $il_cache = [] |
Definition at line 57 of file ilIndependentTemplate.php.
ilIndependantTemplate::get | ( | ?string | $part = null | ) |
Definition at line 114 of file ilIndependentTemplate.php.
References null.
ilIndependantTemplate::getFile | ( | string | $filename | ) |
Reads a file from disk and returns its content.
Copy from Service/PEAR/lib/HTML/Template/IT.php with GlobalCache-stuff removed.
Definition at line 64 of file ilIndependentTemplate.php.
References $filename.
ilIndependantTemplate::loadTemplatefile | ( | string | $filename, |
bool | $removeUnknownVariables = true , |
||
bool | $removeEmptyBlocks = true |
||
) |
Reads a template file from the disk.
unoverwrites IT:loadTemplateFile to deinclude the template input hook
Definition at line 105 of file ilIndependentTemplate.php.
References HTML_Template_IT\loadTemplatefile().