19 declare(strict_types=1);
41 private Render\Loader $component_renderer_loader,
52 $this->
language->loadLanguageModule(
'ui');
54 $root = $root ?? $this;
56 if (is_array($component)) {
58 foreach ($component as $_component) {
59 $out .= $root->render($_component);
80 $root = $root ?? $this;
83 if (is_array($component)) {
84 foreach ($component as $_component) {
85 $out .= $root->renderAsync($_component);
88 $out = $this->
render($component, $root) . $this->java_script_binding->getOnLoadCodeAsync();
103 return $this->component_renderer_loader->getRendererFor($component, $this->
getContexts());
122 $this->contexts[] = $component;
131 array_pop($this->contexts);
render($component, ?Renderer $root=null)
Render given component.If an array of components is passed, this method returns a concatenated output...
pushContext(Component $component)
Adds a component to the current context stack.
Interface Observer Contains several chained tasks and infos about them.
An entity that renders components to a string output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
popContext()
Removes the most recently added component from the current context stack.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct(private Render\Loader $component_renderer_loader, private JavaScriptBinding $java_script_binding, private \ILIAS\Language\Language $language,)
renderAsync($component, ?Renderer $root=null)
Same as render, except that this version also returns any javascript code bound to the on load event...
getContexts()
Returns the current context stack, where most recently added components are last. ...
Provides methods to interface with javascript.
getRendererFor(Component $component)
Get a renderer for a certain Component class.
language()
description: > Example for rendring a language glyph.