ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilTemplateWrapper.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
24 use ilTemplate;
25 
29 class ilTemplateWrapper implements Template
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 }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Wraps an ilTemplate to only provide smaller interface.