ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Renderer.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 2017 Nils Haagen <nils.haagen@concepts-and-training.de> Extended GPL, see docs/LICENSE */
3 
5 
9 
11 {
15  public function render(Component\Component $component, RendererInterface $default_renderer)
16  {
17  $this->checkComponent($component);
18 
19  $tpl = $this->getTemplate("tpl.breadcrumbs.html", true, true);
20 
21  foreach ($component->getItems() as $crumb) {
22  $tpl->setCurrentBlock("crumbs");
23  $tpl->setVariable("CRUMB", $default_renderer->render($crumb));
24  $tpl->parseCurrentBlock();
25  }
26  return $tpl->get();
27  }
28 
32  protected function getComponentInterfaceName()
33  {
34  return array(
35  Component\Breadcrumbs\Breadcrumbs::class
36  );
37  }
38 }
checkComponent(Component $component)
Check if a given component fits this renderer and throw if that is not the case. ...
$tpl
Definition: ilias.php:10
render(Component\Component $component, RendererInterface $default_renderer)
Definition: Renderer.php:15
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.