function panels_renderer_standard::render_pane in Panels 6.3
Same name and namespace in other branches
- 7.3 plugins/display_renderers/panels_renderer_standard.class.php \panels_renderer_standard::render_pane()
Render a pane using its designated style.
This method also manages 'title pane' functionality, where the title from an individual pane can be bubbled up to take over the title for the entire display.
Parameters
stdClass $pane: A Panels pane object, as loaded from the database.
4 calls to panels_renderer_standard::render_pane()
- panels_renderer_editor::render_pane in plugins/
display_renderers/ panels_renderer_editor.class.php - Render a pane using its designated style.
- panels_renderer_single_pane::render in plugins/
display_renderers/ panels_renderer_single_pane.class.php - Build inner content, then hand off to layout-specified theme function for final render step.
- panels_renderer_single_pane::render_single in plugins/
display_renderers/ panels_renderer_single_pane.class.php - panels_renderer_standard::render_panes in plugins/
display_renderers/ panels_renderer_standard.class.php - Render all prepared panes, first by dispatching to their plugin's render callback, then handing that output off to the pane's style plugin.
1 method overrides panels_renderer_standard::render_pane()
- panels_renderer_editor::render_pane in plugins/
display_renderers/ panels_renderer_editor.class.php - Render a pane using its designated style.
File
- plugins/
display_renderers/ panels_renderer_standard.class.php, line 480
Class
- panels_renderer_standard
- The standard render pipeline for a Panels display object.
Code
function render_pane(&$pane) {
$content = $this
->render_pane_content($pane);
if ($this->display->hide_title == PANELS_TITLE_PANE && !empty($this->display->title_pane) && $this->display->title_pane == $pane->pid) {
// If the user selected to override the title with nothing, and selected
// this as the title pane, assume the user actually wanted the original
// title to bubble up to the top but not actually be used on the pane.
if (empty($content->title) && !empty($content->original_title)) {
$this->display->stored_pane_title = $content->original_title;
}
else {
$this->display->stored_pane_title = !empty($content->title) ? $content->title : '';
}
}
if (!empty($content->content)) {
if (!empty($pane->style['style'])) {
$style = panels_get_style($pane->style['style']);
if (isset($style) && isset($style['render pane'])) {
$output = theme($style['render pane'], $content, $pane, $this->display, $style);
// This could be null if no theme function existed.
if (isset($output)) {
return $output;
}
}
}
// fallback
return theme('panels_pane', $content, $pane, $this->display);
}
}