Displays basic page for layout testing purposes.
string An HTML string representing the contents of layout_test page.
public function layoutTestPage() {
// Hack to enable and apply the theme to this page and manually invoke its
// layout plugin and render it.
global $theme;
$theme = 'layout_test_theme';
theme_enable(array(
$theme,
));
$displays = $this->entityStorageController
->load(array(
'test_twocol',
));
$display = reset($displays);
$layout = $display
->getLayoutInstance();
// @todo This tests that the layout can render its regions, but does not test
// block rendering: http://drupal.org/node/1812720.
// 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);
}