You are here

function panels_render_display in Panels 7.3

Same name and namespace in other branches
  1. 8.3 panels.module \panels_render_display()
  2. 5.2 panels.module \panels_render_display()
  3. 6.3 panels.module \panels_render_display()
  4. 6.2 panels.module \panels_render_display()

Panels Render Display.

Render a display by loading the content into an appropriate array and then passing through to panels_render_layout.

if $incoming_content is NULL, default content will be applied. Use an empty string to indicate no content.

9 calls to panels_render_display()
panels_edit_display_form_preview in includes/display-edit.inc
Submission of the preview button. Render the preview and put it into the preview widget area.
panels_mini_block_view in panels_mini/panels_mini.module
Implementation of hook_block_view().
panels_mini_panels_mini_content_type_render in panels_mini/plugins/content_types/panels_mini.inc
Render a mini panel called from a panels display.
panels_node_hook_view in panels_node/panels_node.module
Implementation of hook_view().
panels_panel_context_edit_preview in plugins/task_handlers/panel_context.inc
Form to show a nice preview.

... See full list

File

./panels.module, line 1301
Core functionality for the Panels engine.

Code

function panels_render_display(&$display, $renderer = NULL) {
  ctools_include('plugins', 'panels');
  ctools_include('context');
  if (!empty($display->context)) {
    if ($form_context = ctools_context_get_form($display->context)) {
      $form_context->form['#theme'] = 'panels_render_display_form';
      if (empty($form_context->form['#theme_wrappers']) || !in_array('form', $form_context->form['#theme_wrappers'])) {
        $form_context->form['#theme_wrappers'][] = 'form';
      }
      $form_context->form['#display'] =& $display;
      return $form_context->form;
    }
  }
  return $display
    ->render($renderer);
}