ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilTemplateWrapper.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24use ilTemplate;
25
30{
31 final public function __construct(
32 private ilTemplate $tpl,
33 ) {
34 }
35
39 public function setCurrentBlock(string $name): bool
40 {
41 return $this->tpl->setCurrentBlock($name);
42 }
43
47 public function parseCurrentBlock(): bool
48 {
49 return $this->tpl->parseCurrentBlock();
50 }
51
55 public function touchBlock(string $name): bool
56 {
57 return $this->tpl->touchBlock($name);
58 }
59
63 public function setVariable(string $name, $value): void
64 {
65 $this->tpl->setVariable($name, $value);
66 }
67
71 public function get(?string $block = null): string
72 {
73 if ($block === null) {
74 $block = "__global__";
75 }
76 return $this->tpl->get($block);
77 }
78}
Wraps an ilTemplate to only provide smaller interface.
setVariable(string $name, $value)
@inheritdocs
special template class to simplify handling of ITX/PEAR
Interface to templating as it is used in the UI framework.
Definition: Template.php:29