1.20.x layout.admin.inc layout_add_page()

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

File

modules/layout/layout.admin.inc, line 201
Admin page callbacks for the 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);
}