Renders the layout with sample region content.
\Drupal\layout\Plugin\LayoutInterface $layout: The layout to be rendered.
string Rendered HTML output from the layout.
function renderLayoutDemonstration($layout) {
// Add sample content in the regions that is looked for in the tests.
$regions = $layout
->getRegions();
foreach ($regions as $region => $info) {
$regions[$region] = '<h3>' . $info['label'] . '</h3>';
}
return $layout
->renderLayout(FALSE, $regions);
}