19 declare(strict_types=1);
59 $context_names = $this->getContextNames($contexts);
61 return $factory->getRendererInContext($component, $context_names);
69 if ($component instanceof
Glyph) {
70 return $this->glyph_renderer_factory;
73 return $this->field_renderer_factory;
76 return $this->message_box_renderer_factory;
78 if ($component instanceof
Form) {
79 return $this->form_renderer_factory;
82 return $this->default_renderer_factory;
Loads renderers for components from the file system.
An entity that renders components to a string output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(private RendererFactory $default_renderer_factory, private RendererFactory $glyph_renderer_factory, private RendererFactory $field_renderer_factory, private RendererFactory $message_box_renderer_factory, private RendererFactory $form_renderer_factory,)
This is the interface that components should use if they want to load specific renderers.
getRendererFactoryFor(Component $component)
Loads renderers for components.
getRendererFor(Component $component, array $contexts)