ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
Renderer.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 
15  public function render(Component\Component $component, RendererInterface $default_renderer) {
16  $this->checkComponent($component);
17 
18  $tpl = $this->getTemplate("tpl.counter.html", true, true);
19  $tpl->setCurrentBlock($component->getType());
20  $tpl->setVariable("NUMBER", $component->getNumber());
21  $tpl->parseCurrentBlock();
22 
23  return $tpl->get();
24  }
25 
29  protected function getComponentInterfaceName() {
30  return array(Component\Counter\Counter::class);
31  }
32 }
render(Component\Component $component, RendererInterface $default_renderer)
Definition: Renderer.php:15
checkComponent(Component $component)
Check if a given component fits this renderer and throw if that is not the case. ...
global $tpl
Definition: ilias.php:8
Create styles array
The data for the language used.
getTemplate($name, $purge_unfilled_vars, $purge_unused_blocks)
Get template of component this renderer is made for.