You are here

function panels_render_panel in Panels 6.2

Same name and namespace in other branches
  1. 5.2 panels.module \panels_render_panel()

Render a panel, by storing the content of each pane in an appropriate array and then passing through to the theme function that will render the panel in the configured panel style.

@render

Parameters

$display: A display object.

$panel: The ID of the panel being rendered

$panes: An array of panes that are assigned to the panel that's being rendered.

Return value

The rendered HTML for a panel.

1 call to panels_render_panel()
panels_render_panes in includes/display-render.inc
Render all the panes in a display into a $content array to be used by the display theme function.

File

includes/display-render.inc, line 292
Contains Panels display rendering functions.

Code

function panels_render_panel($display, $panel, $panes) {
  list($style, $style_settings) = panels_get_panel_style_and_settings($display->panel_settings, $panel);

  // Retrieve the pid (can be a panel page id, a mini panel id, etc.), this
  // might be used (or even necessary) for some panel display styles.
  // TODO: Got to fix this to use panel page name instead of pid, since pid is
  // no longer guaranteed. This needs an API to be able to set the final id.
  $owner_id = 0;
  if (isset($display->owner) && is_object($display->owner) && isset($display->owner->id)) {
    $owner_id = $display->owner->id;
  }
  return theme($style['render panel'], $display, $owner_id, $panes, $style_settings, $panel);
}