ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
FieldContextRenderer.php
Go to the documentation of this file.
1 <?php
2 
18 declare(strict_types=1);
19 
21 
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 }
render(Component\Component $component, RendererInterface $default_renderer)
renderDrilldownMenu(Menu\Drilldown $component, RendererInterface $default_renderer)
Definition: Renderer.php:69
renderMenuItems(Menu\Menu $component, RendererInterface $default_renderer)
addMenuFilter(Menu\Menu $component, Template $template, RendererInterface $default_renderer,)
cannotHandleComponent(Component $component)
This method MUST be called by derived component renderers, if.
Renders Drilldown Menu&#39;s in the Input context, specifically used by the Tree (Multi) Select Field...