ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 
10 class ilTemplateWrapper implements Template
11 {
15  protected $global_tpl;
16 
20  private $tpl;
21 
22  final public function __construct(\ilTemplate $global_tpl, \ilTemplate $tpl)
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  return $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  return $this->global_tpl->addOnLoadCode($code);
77  }
78 }
$code
Definition: example_050.php:99
Interface to templating as it is used in the UI framework.
Definition: Template.php:13
if($format !==null) $name
Definition: metadata.php:146
special template class to simplify handling of ITX/PEAR
Wraps an ilTemplate to only provide smaller interface.
__construct(\ilTemplate $global_tpl, \ilTemplate $tpl)