function panels_change_layout_submit in Panels 6.3
Same name and namespace in other branches
- 6.2 includes/display-layout.inc \panels_change_layout_submit()
- 7.3 includes/display-layout.inc \panels_change_layout_submit()
Handle submission of the change layout form.
This submit handler will move panes around and save the display.
1 call to panels_change_layout_submit()
- panels_mini_ui::edit_form_move_submit in panels_mini/
plugins/ export_ui/ panels_mini_ui.class.php
2 string references to 'panels_change_layout_submit'
- panels_change_layout in includes/
display-layout.inc - Form definition for the display layout converter.
- panel_context.inc in plugins/
task_handlers/ panel_context.inc - This is the task handler plugin to handle attaching a panel to any task that advertises itself as a 'context' type, which all of the basic page tasks provided by page_manager.module do by default.
File
- includes/
display-layout.inc, line 264 - Handle the forms for changing a display's layout.
Code
function panels_change_layout_submit($form, &$form_state) {
$display =& $form_state['display'];
if (!empty($form_state['values']['old'])) {
foreach ($form_state['values']['old'] as $id => $new_id) {
if (isset($display->panels[$id])) {
if (!isset($content[$new_id])) {
$content[$new_id] = array();
}
$content[$new_id] = array_merge($content[$new_id], $display->panels[$id]);
}
foreach ($content[$new_id] as $pid) {
$display->content[$pid]->panel = $new_id;
}
}
$display->panels = $content;
}
$display->layout = $form_state['layout'];
}