You are here

function panels_page_wizard_add_content in Panels 7.3

Same name and namespace in other branches
  1. 6.3 includes/page-wizard.inc \panels_page_wizard_add_content()

Add content editor form helper for panels page wizards.

This is not a proper form, it is meant to be called by a form to add elements to it.

1 call to panels_page_wizard_add_content()
panels_landing_page_content in plugins/page_wizards/landing_page.inc
Second page of our wizard. This one provides a layout and lets the user add content.

File

includes/page-wizard.inc, line 47
Contains helper functions for the Panels page wizards.

Code

function panels_page_wizard_add_content(&$form, &$form_state) {
  ctools_include('ajax');
  ctools_include('plugins', 'panels');
  ctools_include('common', 'panels');
  ctools_include('display-edit', 'panels');

  // Panels provides this caching mechanism to make it easy to use the
  // wizard to cache the display.
  $cache = panels_edit_cache_get('panels_page_wizard:' . $form_state['plugin']['name']);
  $form_state['renderer'] = panels_get_renderer_handler('editor', $cache->display);
  $form_state['renderer']->cache =& $cache;
  $form_state['display'] =& $cache->display;
  $form_state['content_types'] = $cache->content_types;

  // Tell the Panels form not to display buttons.
  $form_state['no buttons'] = TRUE;
  $form_state['display_title'] = !empty($cache->display_title);
  $form = panels_edit_display_form($form, $form_state);
}