ILIAS  release_7 Revision v7.30-3-g800a261c036
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
11{
15 protected $global_tpl;
16
20 private $tpl;
21
23 {
24 $this->global_tpl = $global_tpl;
25 $this->tpl = $tpl;
26 }
27
31 public function setCurrentBlock($name)
32 {
33 return $this->tpl->setCurrentBlock($name);
34 }
35
39 public function parseCurrentBlock()
40 {
41 return $this->tpl->parseCurrentBlock();
42 }
43
47 public function touchBlock($name)
48 {
49 return $this->tpl->touchBlock($name);
50 }
51
55 public function setVariable($name, $value)
56 {
57 $this->tpl->setVariable($name, $value);
58 }
59
63 public function get($block = null)
64 {
65 if ($block === null) {
66 $block = "__global__";
67 }
68 return $this->tpl->get($block);
69 }
70
74 public function addOnLoadCode($code)
75 {
76 $this->global_tpl->addOnLoadCode($code);
77 }
78}
An exception for terminatinating execution or to throw for unit testing.
Wraps an ilTemplate to only provide smaller interface.
__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:14
if($format !==null) $name
Definition: metadata.php:230