ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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 
20 class 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 }
Class Factory.
Loads renderers for components from the file system.
Definition: FSLoader.php:20
Class ChatMainBarProvider .
This is the interface that components should use if they want to load specific renderers.
__construct(RendererFactory $default_renderer_factory, RendererFactory $glyph_renderer_factory, RendererFactory $field_renderer_factory)
Definition: FSLoader.php:39
getRendererFactoryFor(Component $component)
Definition: FSLoader.php:62
Loads renderers for components.
Definition: Loader.php:12
getRendererFor(Component $component, array $contexts)
Definition: FSLoader.php:52
$factory
Definition: metadata.php:58