You are here

function panels_render_display in Panels 6.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.2 panels.module \panels_render_display()
  4. 7.3 panels.module \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.

Related topics

7 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 in panels_mini/panels_mini.module
Implementation of hook_block().
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_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 1015
panels.module

Code

function panels_render_display(&$display, $renderer = NULL) {
  ctools_include('display-render', 'panels');
  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';
      $form_context->form['#display'] =& $display;
      $form_context->form['#form_context_id'] = $form_context->id;
      return drupal_render_form($form_context->form_id, $form_context->form);
    }
  }
  return $display
    ->render($renderer);
}