You are here

function panels_edit_display_settings_form_submit in Panels 7.3

Same name and namespace in other branches
  1. 6.3 includes/display-edit.inc \panels_edit_display_settings_form_submit()

Store changes from the layout settings form.

3 calls to panels_edit_display_settings_form_submit()
panels_change_layout_submit in includes/display-layout.inc
Handle submission of the change layout form.
panels_edit_display_form_submit in includes/display-edit.inc
Handle form submission of the display content editor.
panels_layouts_ui::edit_form_submit in plugins/export_ui/panels_layouts_ui.class.php
Handle the submission of the edit form.

File

includes/display-edit.inc, line 311
Core Panels API include file containing various display-editing functions. This includes all the basic editing forms (content, layout, layout settings) as well as the ajax modal forms associated with them.

Code

function panels_edit_display_settings_form_submit($form, &$form_state) {
  $display =& $form_state['display'];
  if ($function = panels_plugin_get_function('layouts', $form_state['layout'], 'settings submit')) {
    $function($form_state['values']['layout_settings'], $display, $form_state['layout'], $display->layout_settings);
  }

  // Since not all layouts have layout settings, check here in case of notices.
  if (isset($form_state['values']['layout_settings'])) {
    $display->layout_settings = $form_state['values']['layout_settings'];
  }
  if (isset($form_state['values']['display_title']['title'])) {
    $display->title = $form_state['values']['display_title']['title'];
    $display->hide_title = $form_state['values']['display_title']['hide_title'];
  }
}