ILIAS  release_8 Revision v8.24
ilTemplateWrapper.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22
24use ilTemplate;
25
30{
33
35 {
36 $this->global_tpl = $global_tpl;
37 $this->tpl = $tpl;
38 }
39
43 public function setCurrentBlock(string $name): bool
44 {
45 return $this->tpl->setCurrentBlock($name);
46 }
47
51 public function parseCurrentBlock(): bool
52 {
53 return $this->tpl->parseCurrentBlock();
54 }
55
59 public function touchBlock(string $name): bool
60 {
61 return $this->tpl->touchBlock($name);
62 }
63
67 public function setVariable(string $name, $value): void
68 {
69 $this->tpl->setVariable($name, $value);
70 }
71
75 public function get(string $block = null): string
76 {
77 if ($block === null) {
78 $block = "__global__";
79 }
80 return $this->tpl->get($block);
81 }
82
86 public function addOnLoadCode(string $code): void
87 {
88 $this->global_tpl->addOnLoadCode($code);
89 }
90}
Wraps an ilTemplate to only provide smaller interface.
setVariable(string $name, $value)
@inheritdocs
__construct(ilGlobalTemplateInterface $global_tpl, ilTemplate $tpl)
special template class to simplify handling of ITX/PEAR
Interface to templating as it is used in the UI framework.
Definition: Template.php:29
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if($format !==null) $name
Definition: metadata.php:247
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...