You are here

function panels_render_display in Panels 5.2

Same name and namespace in other branches
  1. 8.3 panels.module \panels_render_display()
  2. 6.3 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.

6 calls to panels_render_display()
panels_mini_block in panels_mini/panels_mini.module
Implementation of hook_block().
panels_mini_content in panels_mini/panels_mini.module
Render a mini panel called from a panels display.
panels_mini_preview_panel in panels_mini/panels_mini.module
Provide an administrative preview of a mini panel.
panels_node_view in panels_node/panels_node.module
Implementation of hook_view().
panels_page_view_page in panels_page/panels_page.module
Page callback to view a panel page.

... See full list

File

./panels.module, line 911
panels.module Core API for Panels. Provides display editing and rendering capabilities.

Code

function panels_render_display(&$display) {
  panels_load_include('plugins');
  $layout = panels_get_layout($display->layout);
  if (!$layout) {
    return NULL;
  }

  // TODO: This may not be necessary now. Check this.
  panels_sanitize_display($display);
  $output = '';

  // Let modules act just prior to render.
  foreach (module_implements('panels_pre_render') as $module) {
    $function = $module . '_panels_pre_render';
    $output .= $function($display);
  }
  $output .= panels_render_layout($layout, $display, $display->css_id, $display->layout_settings);

  // Let modules act just after render.
  foreach (module_implements('panels_post_render') as $module) {
    $function = $module . '_panels_post_render';
    $output .= $function($display);
  }
  return $output;
}