protected function RenderTrait::renderRoot in UI Patterns 8
Renders final HTML given a structured array tree.
Parameters
array $elements: The structured array describing the data to be rendered.
Return value
string The rendered HTML.
Throws
\Exception When called from inside another renderRoot() call.
See also
\Drupal\Core\Render\RendererInterface::render()
1 call to RenderTrait::renderRoot()
- UiPatternsPreviewTest::testProcessContext in tests/
src/ Kernel/ UiPatternsPreviewTest.php - Test processContext.
File
- tests/
src/ Traits/ RenderTrait.php, line 24
Class
- RenderTrait
- Helper rendering trait.
Namespace
Drupal\Tests\ui_patterns\TraitsCode
protected function renderRoot(array &$elements) {
return (string) $this->container
->get('renderer')
->renderRoot($elements);
}