1 layout.admin.inc layout_add_page()

Menu callback; Display the form for adding a new layout.

File

core/modules/layout/layout.admin.inc, line 192
Administrative functions for Layout module.

Code

function layout_add_page() {
  if (isset($_SESSION['layout_new_name'])) {
    $layout = layout_tempstore_load($_SESSION['layout_new_name']);
  }
  if (empty($layout)) {
    $config = array(
      'is_new' => TRUE,
    );
    $layout = new Layout($config);
  }
  backdrop_set_title(t('Add layout'));
  return backdrop_get_form('layout_settings_form', $layout);
}