38 if (is_array($component)) {
39 foreach ($component as $_component) {
41 $out .= $renderer->render($_component, $this);
45 $out = $renderer->render($component, $this);
58 if (is_array($component)) {
59 foreach ($component as $_component) {
61 $this->component_renderer_loader
62 ->getRendererFactoryFor($_component)
64 ->getOnLoadCodeAsync();
68 $this->component_renderer_loader
69 ->getRendererFactoryFor($component)
71 ->getOnLoadCodeAsync();
88 return $this->component_renderer_loader->getRendererFor($component, $this->
getContexts());
97 $clone->contexts[] = $context;
An exception for terminatinating execution or to throw for unit testing.
Renderer that dispatches rendering of UI components to a Renderer found in the same namespace as the ...
withAdditionalContext(Component $context)
Get a new renderer with an additional context.A context makes it possible to use another renderer for...
getContexts()
Get the contexts that are added via withAdditionalContext where most recently added contexts come las...
$component_renderer_loader
render($component)
Render given component.If an array of components is passed, this method returns a concatenated output...
getRendererFor(Component $component)
Get a renderer for a certain Component class.
__construct(Render\Loader $component_renderer_loader)
renderAsync($component)
Same as render, except that this version also returns any javascript code bound to the on load event,...
A component is the most general form of an entity in the UI.
An entity that renders components to a string output.
An entity that renders components to a string output.