function panels_skinr_submit_handler_display in Skinr 6.2
Same name and namespace in other branches
- 6 modules/panels.skinr.inc \panels_skinr_submit_handler_display()
@todo remove values from skinr if a display is deleted
Related topics
1 string reference to 'panels_skinr_submit_handler_display'
- panels_skinr_config in modules/
panels.skinr.inc - Implementation of hook_skinr_config().
File
- modules/
panels.skinr.inc, line 290 - Provide skinr handling for panels.module.
Code
function panels_skinr_submit_handler_display(&$form, $form_state, $module, $form_settings) {
$form_id = $form_state['values']['form_id'];
// Include ctools' object cache files.
ctools_include('object-cache');
if ($form_state['values']['op'] == t('Save') || $form_state['values']['op'] == t('Update and save')) {
switch ($form_id) {
case 'panels_panel_context_edit_content':
case 'page_manager_save_page_form':
// Panel page.
foreach ($form_state['page']->handler_info as $id => $info) {
if ($info['changed']) {
_panels_skinr_save_and_clear_cache($form_state['page']->handlers[$id]->conf['did']);
}
}
break;
case 'panels_edit_display_form':
// Mini panels.
_panels_skinr_save_and_clear_cache($form_state['display']->did);
break;
}
}
elseif ($form_state['values']['op'] == t('Cancel')) {
switch ($form_id) {
case 'page_manager_save_page_form':
// Panel page.
foreach ($form_state['page']->handler_info as $id => $info) {
if ($info['changed']) {
ctools_object_cache_clear('skinr', $form_state['page']->handlers[$id]->conf['did']);
}
}
break;
case 'panels_edit_display_form':
// Mini panels.
ctools_object_cache_clear('skinr', $form_state['display']->did);
break;
}
}
}