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 entity that renders components to a string output.
withAdditionalContext(Component $context)
Get a new renderer with an additional context.A context makes it possible to use another renderer for...
$component_renderer_loader
getContexts()
Get the contexts that are added via withAdditionalContext where most recently added contexts come las...
__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...
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.