63 return $renderer->render($component, $this);
77 if (array_key_exists($class, $this->cache)) {
78 return $this->cache[$class];
81 $renderer->registerResources($this->resource_registry);
82 $this->cache[$class] = $renderer;
97 if (!class_exists($renderer_class)) {
98 throw new \LogicException(
"No rendered for '".$class.
"' found.");
100 return new $renderer_class($this->ui_factory, $this->tpl_factory, $this->lng, $this->js_binding);
110 $parts = explode(
"\\", $class);
111 $parts[count($parts)-1] =
"Renderer";
112 return implode(
"\\", $parts);
getRendererFor($class)
Get a renderer for a certain Component class.
Registry for resources required by rendered output like Javascript or CSS.
An entity that renders components to a string output.
__construct(RootFactory $ui_factory, TemplateFactory $tpl_factory, ResourceRegistry $resource_registry, \ilLanguage $lng, JavaScriptBinding $js_binding)
render(Component $component)
instantiateRendererFor($class)
Instantiate a renderer for a certain Component class.
Provides methods to interface with javascript.
Create styles array
The data for the language used.
getRendererNameFor($class)
Get the class name for the renderer of Component class.
Interface for a factory that provides templates.