You are here

function panels_page_edit_layout_settings in Panels 5.2

Same name and namespace in other branches
  1. 6.2 panels_page/panels_page.admin.inc \panels_page_edit_layout_settings()

Pass through to the panels layout settings editor.

1 string reference to 'panels_page_edit_layout_settings'
panels_page_admin_menu_items in panels_page/panels_page.module
Helper function to add a menu item for a panel.

File

panels_page/panels_page.admin.inc, line 724
panels_page.admin.inc

Code

function panels_page_edit_layout_settings($panel_page, $did = NULL, $next = NULL) {
  if (!is_object($panel_page)) {
    $panel_page = panels_page_load($panel_page);
  }
  panels_page_fetch_display($panel_page, $did);
  $display = $panel_page->display;
  if (empty($next)) {
    $button = t('Save');
    $dest = "admin/panels/panel-page/{$panel_page->name}/edit/settings";
    if ($did) {
      $dest .= "/{$did}";
    }
  }
  else {
    $button = t('Save and proceed');
    $dest = "admin/panels/panel-page/{$panel_page->name}/edit/advanced/next";
  }

  // The following form will return the $display upon successful submit, if
  // we didn't send the $dest. Which we don't, here.
  $output = panels_edit_layout_settings($display, $button, NULL, $panel_page->title);
  if (is_object($output)) {
    $panel_page->display = $output;
    panels_page_save_display($panel_page);
    drupal_goto($dest);
  }
  drupal_set_title(check_plain(panels_page_get_title($panel_page)));
  return $output;
}