ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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  $tpl->setVariable("ARIA_LABEL", $this->txt('breadcrumbs_aria_label'));
22 
23  foreach ($component->getItems() as $crumb) {
24  $tpl->setCurrentBlock("crumbs");
25  $tpl->setVariable("CRUMB", $default_renderer->render($crumb));
26  $tpl->parseCurrentBlock();
27  }
28  return $tpl->get();
29  }
30 
34  protected function getComponentInterfaceName()
35  {
36  return array(
37  Component\Breadcrumbs\Breadcrumbs::class
38  );
39  }
40 }
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
checkComponent(Component $component)
Check if a given component fits this renderer and throw if that is not the case. ...
render(Component\Component $component, RendererInterface $default_renderer)
Definition: Renderer.php:15
getTemplate($name, $purge_unfilled_vars, $purge_unused_blocks)
Get template of component this renderer is made for.