You are here

function panels_panel_context_edit_choose in Panels 6.3

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

Choose a layout for this panel.

This is only called during 'add', when we know that there isn't a previous layout to choose from. a different, only slightly different variant is called to change a pre-existing layout.

1 string reference to 'panels_panel_context_edit_choose'
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 534
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_choose(&$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 = array_merge($form, panels_choose_layout($form_state));
}