You are here

function _panels_edit_layout_settings in Panels 6.2

Same name and namespace in other branches
  1. 5.2 includes/display_edit.inc \_panels_edit_layout_settings()

Handle calling and processing of the form for editing display layout settings.

Helper function for panels_edit_layout_settings().

See also

panels_edit_layout_settings() for details on the various behaviors of this function.

1 call to _panels_edit_layout_settings()
panels_edit_layout_settings in ./panels.module
API entry point for configuring the layout settings for a given display.

File

includes/display-layout-settings.inc, line 15
Form and ajax handling for edit layout settings

Code

function _panels_edit_layout_settings($display, $finish, $destination, $title) {
  $form_state = array(
    'display' => &$display,
    'finish' => $finish,
    'destination' => $destination,
    'display_title' => $title,
    're_render' => FALSE,
    'no_redirect' => TRUE,
  );
  $output = drupal_build_form('panels_edit_layout_settings_form', $form_state);

  // no output == submit
  if (!$output) {
    panels_save_display($display);
    panels_cache_clear('style_settings', $display->did);
    drupal_set_message(t("Your layout settings have been saved."));
    if (!empty($form_state['clicked_button']['#return_here'])) {
      drupal_goto($_GET['q']);
    }
    if ($destination) {
      return drupal_goto($destination);
    }
    return $form_state['display'];
  }
  return $output;
}