ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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
33
38
39 public function __construct(
43 ) {
44 $this->default_renderer_factory = $default_renderer_factory;
45 $this->glyph_renderer_factory = $glyph_renderer_factory;
46 $this->field_renderer_factory = $field_renderer_factory;
47 }
48
52 public function getRendererFor(Component $component, array $contexts)
53 {
54 $context_names = $this->getContextNames($contexts);
55 $factory = $this->getRendererFactoryFor($component);
56 return $factory->getRendererInContext($component, $context_names);
57 }
58
62 public function getRendererFactoryFor(Component $component)
63 {
64 if ($component instanceof \ILIAS\UI\Implementation\Component\Symbol\Glyph\Glyph) {
66 }
67 if ($component instanceof \ILIAS\UI\Implementation\Component\Input\Field\Input) {
69 }
71 }
72}
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:62
getRendererFor(Component $component, array $contexts)
@inheritdocs
Definition: FSLoader.php:52
__construct(RendererFactory $default_renderer_factory, RendererFactory $glyph_renderer_factory, RendererFactory $field_renderer_factory)
Definition: FSLoader.php:39
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.
$factory
Definition: metadata.php:58
Class ChatMainBarProvider \MainMenu\Provider.
Class Factory.