19declare(strict_types=1);
21require_once(__DIR__ .
'/../../../../../vendor/composer/vendor/autoload.php');
24require_once(__DIR__ .
'/../../../../../components/ILIAS/UICore/lib/html-it/IT.php');
25require_once(__DIR__ .
'/../../../../../components/ILIAS/UICore/lib/html-it/ITX.php');
26require_once(__DIR__ .
'/../../../../../components/ILIAS/UICore/classes/class.ilTemplate.php');
35 $vars = self::DEFAULT_BLOCK,
46 bool $add_error_mess =
false,
47 bool $handle_referer =
false,
48 bool $add_ilias_footer =
false,
49 bool $add_standard_elements =
false,
50 bool $a_main_menu =
true,
53 return $this->
template->get($part);
66 if (
$filename[0] ===
'/' && substr($this->fileRoot, -1) ===
'/') {
75 $this->err[] = (
new PEAR())->raiseError(
76 $this->errorMessage(self::IT_TPL_NOT_FOUND) .
78 self::IT_TPL_NOT_FOUND
89 $content = fread($fh, $fsize);
92 return preg_replace_callback(
93 "#<!-- INCLUDE (.*) -->#im",
95 return $this->getFile($hit[1]);
107 bool $removeUnknownVariables =
true,
108 bool $removeEmptyBlocks =
true
114 public function get(?
string $part =
null):
string
116 if ($part ===
null) {
117 $part = self::IT_DEFAULT_BLOCK;
119 if ($part === self::IT_DEFAULT_BLOCK && !$this->flagGlobalParsed) {
120 $this->parse(self::IT_DEFAULT_BLOCK);
123 if (!isset($this->blocklist[$part])) {
128 if (isset($this->blockdata[$part])) {
129 $ret = $this->blockdata[$part];
130 if ($this->clearCache) {
131 unset($this->blockdata[$part]);
133 if ($this->_options[
'preserve_data']) {
135 $this->openingDelimiter .
136 '%preserved%' . $this->closingDelimiter,
137 $this->openingDelimiter,
Integrated Template - IT Well there's not much to say about it.
special template class to simplify handling of ITX/PEAR
setBodyClass(string $a_class="")
Sets the body-tags class.
loadTemplatefile(string $filename, bool $removeUnknownVariables=true, bool $removeEmptyBlocks=true)
Reads a template file from the disk.
getFile(string $filename)
Reads a file from disk and returns its content.
__construct( $file, $flag1, $flag2, $in_module='', $vars=self::DEFAULT_BLOCK, $plugin=false, $a_use_cache=true)
special template class to simplify handling of ITX/PEAR
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface to templating as it is used in the UI framework.