ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
FieldContextRenderer.php
Go to the documentation of this file.
1<?php
2
18declare(strict_types=1);
19
21
24use ILIAS\UI\Renderer as RendererInterface;
28
36{
37 public function render(Component\Component $component, RendererInterface $default_renderer): string
38 {
39 if ($component instanceof Drilldown) {
40 return $this->renderDrilldownMenu($component, $default_renderer);
41 }
42 $this->cannotHandleComponent($component);
43 }
44
45 protected function renderMenuItems(
46 Menu\Menu $component,
47 RendererInterface $default_renderer
48 ): string {
49 // delegate Input\Field\Node components directly to the rendering chain.
50 return $default_renderer->render($component->getItems());
51 }
52
53 protected function addMenuFilter(
54 Menu\Menu $component,
55 Template $template,
56 RendererInterface $default_renderer,
57 ): void {
58 // do not render filter; Tree(Multi)Select needs special search mechanism.
59 }
60}
Renders Drilldown Menu's in the Input\Field context, specifically used by the Tree (Multi) Select Fie...
renderMenuItems(Menu\Menu $component, RendererInterface $default_renderer)
addMenuFilter(Menu\Menu $component, Template $template, RendererInterface $default_renderer,)
render(Component\Component $component, RendererInterface $default_renderer)
cannotHandleComponent(Component $component)
This method MUST be called by derived component renderers, if.
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface to templating as it is used in the UI framework.
Definition: Template.php:29
An entity that renders components to a string output.
Definition: Renderer.php:31