You are here

function panels_panel_context_edit_content_submit in Panels 6.3

Same name and namespace in other branches
  1. 7.3 plugins/task_handlers/panel_context.inc \panels_panel_context_edit_content_submit()

File

plugins/task_handlers/panel_context.inc, line 687
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.

Code

function panels_panel_context_edit_content_submit(&$form, &$form_state) {
  panels_edit_display_form_submit($form, $form_state);
  $handler =& $form_state['handler'];

  // update the cached display:
  $display = $form_state['page']->display_cache[$form_state['handler_id']]->display;
  $handler->conf['display'] = $display;
  unset($form_state['page']->display_cache[$form_state['handler_id']]);
  if ($form_state['clicked_button']['#value'] == t('Update and preview')) {
    $form_state['new trail'] = array(
      'handlers',
      $form_state['handler_id'],
      'preview',
    );
  }
}