ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilTemplateWrapper.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2016 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
6
10class ilTemplateWrapper implements Template {
14 protected $global_tpl;
15
19 private $tpl;
20
21 final public function __construct(\ilTemplate $global_tpl, \ilTemplate $tpl) {
22 $this->global_tpl = $global_tpl;
23 $this->tpl = $tpl;
24 }
25
29 public function setCurrentBlock($name) {
30 return $this->tpl->setCurrentBlock($name);
31 }
32
36 public function parseCurrentBlock() {
37 return $this->tpl->parseCurrentBlock();
38 }
39
43 public function touchBlock($name) {
44 return $this->tpl->touchBlock($name);
45 }
46
50 public function setVariable($name, $value) {
51 return $this->tpl->setVariable($name, $value);
52 }
53
57 public function get($block = null) {
58 if ($block === null) {
59 $block = "__global__";
60 }
61 return $this->tpl->get($block);
62 }
63
67 public function addOnLoadCode($code) {
68 return $this->global_tpl->addOnLoadCode($code);
69 }
70}
An exception for terminatinating execution or to throw for unit testing.
Wraps an ilTemplate to only provide smaller interface.
__construct(\ilTemplate $global_tpl, \ilTemplate $tpl)
special template class to simplify handling of ITX/PEAR
$code
Definition: example_050.php:99
Interface to templating as it is used in the UI framework.
Definition: Template.php:13