ILIAS  release_8 Revision v8.24
Renderer.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22
24use ILIAS\UI\Renderer as RendererInterface;
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}
getComponentInterfaceName()
Get the name of the component-interface this renderer is supposed to render.ATTENTION: Fully qualifie...
Definition: Renderer.php:51
render(Component\Component $component, RendererInterface $default_renderer)
Definition: Renderer.php:32
checkComponent(Component $component)
Check if a given component fits this renderer and throw \LogicError if that is not the case.
getTemplate(string $name, bool $purge_unfilled_vars, bool $purge_unused_blocks)
Get template of component this renderer is made for.
An entity that renders components to a string output.
Definition: Renderer.php:31
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Breadcrumbs.php:21