ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
FSLoader.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
20class FSLoader implements Loader
21{
22 use LoaderHelper;
23
28
30 {
31 $this->default_renderer_factory = $default_renderer_factory;
32 }
33
37 public function getRendererFor(Component $component, array $contexts)
38 {
39 $context_names = $this->getContextNames($contexts);
40 $factory = $this->getRendererFactoryFor($component);
41 return $factory->getRendererInContext($component, $context_names);
42 }
43
47 public function getRendererFactoryFor(Component $component)
48 {
50 }
51}
$factory
Definition: metadata.php:47
An exception for terminatinating execution or to throw for unit testing.
Loads renderers for components from the file system.
Definition: FSLoader.php:21
getRendererFactoryFor(Component $component)
@inheritdocs
Definition: FSLoader.php:47
getRendererFor(Component $component, array $contexts)
@inheritdocs
Definition: FSLoader.php:37
__construct(RendererFactory $default_renderer_factory)
Definition: FSLoader.php:29
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
This is the interface that components should use if they want to load specific renderers.