You are here

function panels_panel_context_edit_layout in Panels 7.3

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

Change the layout for this panel.

This form is only used if a layout already exists and the user wants to change to a different one. The submit handler changes the next form to the move content form, which is 'hidden' so it won't be accessed directly.

1 string reference to 'panels_panel_context_edit_layout'
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

plugins/task_handlers/panel_context.inc, line 624
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_layout($form, &$form_state) {
  ctools_include('common', 'panels');
  ctools_include('display-layout', 'panels');
  ctools_include('plugins', 'panels');

  // @todo -- figure out where/how to deal with this.
  $form_state['allowed_layouts'] = 'panels_page';
  $form_state['display'] =& panels_panel_context_get_display($form_state['handler']);

  // Tell the Panels form not to display buttons.
  $form_state['no buttons'] = TRUE;

  // Change the #id of the form so the CSS applies properly.
  $form['#id'] = 'panels-choose-layout';
  $form = panels_choose_layout($form, $form_state);
  return $form;
}