ILIAS  release_7 Revision v7.30-3-g800a261c036
LoaderResourceRegistryWrapper.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2017 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
6
8
13{
18
22 private $loader;
23
25 {
26 $this->resource_registry = $resource_registry;
27 $this->loader = $loader;
28 }
29
33 public function getRendererFor(Component $component, array $contexts)
34 {
35 $renderer = $this->loader->getRendererFor($component, $contexts);
36 $renderer->registerResources($this->resource_registry);
37 return $renderer;
38 }
39
43 public function getRendererFactoryFor(Component $component)
44 {
45 return $this->loader->getRendererFactoryFor($component);
46 }
47}
An exception for terminatinating execution or to throw for unit testing.
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:14
Loads renderers for components.
Definition: Loader.php:13
Registry for resources required by rendered output like Javascript or CSS.