ILIAS  release_7 Revision v7.30-3-g800a261c036
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
7use ILIAS\UI\Renderer as RendererInterface;
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}
An exception for terminatinating execution or to throw for unit testing.
getComponentInterfaceName()
Get the name of the component-interface this renderer is supposed to render.ATTENTION: Fully qualifie...
Definition: Renderer.php:34
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.
checkComponent(Component $component)
Check if a given component fits this renderer and throw \LogicError if that is not the case.
A component is the most general form of an entity in the UI.
Definition: Component.php:14
An entity that renders components to a string output.
Definition: Renderer.php:15
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41