function panels_common_save_context in Panels 5.2
Same name and namespace in other branches
- 6.2 includes/common-context.inc \panels_common_save_context()
3 calls to panels_common_save_context()
- panels_mini_context_form_submit in panels_mini/
panels_mini.module - Process submission of the mini panel edit form.
- panels_node_context_form_submit in panels_node/
panels_node.module - Process submission of the panel node edit form.
- panels_page_context_form_submit in panels_page/
panels_page.admin.inc - Process submission of the panel page edit form.
File
- includes/
common.inc, line 1434 - Functions used by more than one panels client module.
Code
function panels_common_save_context($type, &$ref, $form_values) {
// Organize arguments
$ref = array();
if (isset($form_values[$type . '_order']) && $form_values[$type . '_order'] !== '') {
foreach (explode(',', $form_values[$type . '_order']) as $position) {
// We retain the original position here because we need argument IDs.
$ref[$position] = $form_values[$type . 's'][$position];
}
}
}