function panels_edit_display_form_submit in Panels 6.3
Same name and namespace in other branches
- 6.2 includes/display-edit.inc \panels_edit_display_form_submit()
- 7.3 includes/display-edit.inc \panels_edit_display_form_submit()
Handle form submission of the display content editor.
This reads the location of the various panes from the form, which will have been modified from the ajax, rearranges them and then saves the display.
3 calls to panels_edit_display_form_submit()
- panels_mini_ui::edit_form_content_submit in panels_mini/
plugins/ export_ui/ panels_mini_ui.class.php - panels_page_wizard_add_content_submit in includes/
page-wizard.inc - panels_panel_context_edit_content_submit in plugins/
task_handlers/ panel_context.inc
2 string references to 'panels_edit_display_form_submit'
- panels_edit_display_form in includes/
display-edit.inc - Form definition for the panels display editor
- panels_ipe_edit_control_form in panels_ipe/
plugins/ display_renderers/ panels_renderer_ipe.class.php - FAPI callback to create the Save/Cancel form for the IPE.
File
- includes/
display-edit.inc, line 142
Code
function panels_edit_display_form_submit($form, &$form_state) {
$display =& $form_state['display'];
$old_content = $display->content;
$display->content = array();
if (!empty($form_state['values']['panel']['pane'])) {
foreach ($form_state['values']['panel']['pane'] as $panel_id => $panes) {
$display->panels[$panel_id] = array();
if ($panes) {
$pids = explode(',', $panes);
// need to filter the array, b/c passing it in a hidden field can generate trash
foreach (array_filter($pids) as $pid) {
if ($old_content[$pid]) {
$display->panels[$panel_id][] = $pid;
$old_content[$pid]->panel = $panel_id;
$display->content[$pid] = $old_content[$pid];
}
}
}
}
}
panels_edit_display_settings_form_submit($form, $form_state);
}