1 layout_test.module layout_test_custom_layout_type_test_page()

Menu callback; Display a test page with a custom layout type.

File

core/modules/layout/tests/layout_test/layout_test.module, line 151
Layout test module.

Code

function layout_test_custom_layout_type_test_page() {
  $custom_layout_template = layout_flexible_template_load('default', 'custom_test');
  $config = array(
    'name' => 'custom_layout_test',
    'title' => 'Custom Layout Test',
    'is_new' => TRUE,
    'layout_template' => $custom_layout_template->name,
    'layout_template_type' => 'custom_test',
    'is_full_page' => FALSE,
  );
  $custom_layout = new Layout($config);
  $custom_layout->addBlock('layout_test', 'simple_text', 'custom-layout-default-template--0');
  $renderer = layout_create_renderer('standard', $custom_layout);
  return $renderer->render();
}