function panels_render_panel in Panels 5.2
Same name and namespace in other branches
- 6.2 includes/display-render.inc \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.
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 ./
panels.module - Render all the panes in a display into a $content array to be used by the display theme function.
File
- ./
panels.module, line 1183 - panels.module Core API for Panels. Provides display editing and rendering capabilities.
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);
}