function theme_panels_rounded_corners_style_render_panel in Panels 6.2
Same name and namespace in other branches
- 5.2 styles/rounded_corners.inc \theme_panels_rounded_corners_style_render_panel()
Render callback.
File
- styles/
rounded_corners.inc, line 34 - styles/rounded_corners.inc Definition of the 'rounded_corners' panel style.
Code
function theme_panels_rounded_corners_style_render_panel($display, $panel_id, $panes, $settings) {
$output = '';
// Determine where to put the box. If empty or 'pane' around each pane. If
// 'panel' then just around the whole panel.
$where = empty($settings['corner_location']) ? 'pane' : $settings['corner_location'];
$print_separator = FALSE;
foreach ($panes as $pane_id => $pane) {
// Add the separator if we've already displayed a pane.
if ($print_separator) {
$output .= '<div class="panel-separator"></div>';
}
$text = panels_render_pane($pane, $display->content[$pane_id], $display);
if ($text) {
$output .= $where == 'pane' ? panels_rounded_corners_box($text) : $text;
}
// If we displayed a pane, this will become true; if not, it will become
// false.
$print_separator = (bool) $text;
}
if ($where == 'panel') {
$output = panels_rounded_corners_box($output);
}
panels_add_rounded_corners_css($display, $where);
return $output;
}