ILIAS  release_8 Revision v8.24
LoaderResourceRegistryWrapper.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22
24
29{
31 private Loader $loader;
32
34 {
35 $this->resource_registry = $resource_registry;
36 $this->loader = $loader;
37 }
38
42 public function getRendererFor(Component $component, array $contexts): ComponentRenderer
43 {
44 $renderer = $this->loader->getRendererFor($component, $contexts);
45 $renderer->registerResources($this->resource_registry);
46 return $renderer;
47 }
48
52 public function getRendererFactoryFor(Component $component): RendererFactory
53 {
54 return $this->loader->getRendererFactoryFor($component);
55 }
56}
Registers resources for retreived renderers at a ResourceRegistry.
getRendererFor(Component $component, array $contexts)
@inheritdocs
__construct(ResourceRegistry $resource_registry, Loader $loader)
A component is the most general form of an entity in the UI.
Definition: Component.php:28
An entity that renders components to a string output.
registerResources(ResourceRegistry $registry)
Announce resources this renderer requires.
Loads renderers for components.
Definition: Loader.php:30
This is the interface that components should use if they want to load specific renderers.
Registry for resources required by rendered output like Javascript or CSS.
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...