ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
Renderer.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 
26 
28 {
32  public function render(Component\Component $component, RendererInterface $default_renderer): string
33  {
34  $this->checkComponent($component);
35 
36  $tpl = $this->getTemplate("tpl.breadcrumbs.html", true, true);
37 
38  $tpl->setVariable("ARIA_LABEL", $this->txt('breadcrumbs_aria_label'));
39 
40  foreach ($component->getItems() as $crumb) {
41  $tpl->setCurrentBlock("crumbs");
42  $tpl->setVariable("CRUMB", $default_renderer->render($crumb));
43  $tpl->parseCurrentBlock();
44  }
45  return $tpl->get();
46  }
47 
51  protected function getComponentInterfaceName(): array
52  {
53  return array(Component\Breadcrumbs\Breadcrumbs::class);
54  }
55 }
checkComponent(Component $component)
Check if a given component fits this renderer and throw if that is not the case. ...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $id)
Get a text from the language file.
render(Component\Component $component, RendererInterface $default_renderer)
Definition: Renderer.php:32
getTemplate(string $name, bool $purge_unfilled_vars, bool $purge_unused_blocks)
Get template of component this renderer is made for.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Breadcrumbs.php:21
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41