dark_blue_background.inc in Panopoly Demo 7
File
plugins/styles/dark_blue_background/dark_blue_background.inc
View source
<?php
$plugin = array(
'title' => t('Dark Blue Background'),
'description' => t('Wraps panes in the Drupal dark blue style.'),
'render pane' => 'panopoly_demo_dark_blue_background_render_pane',
'render region' => 'panopoly_demo_dark_blue_background_render_region',
'weight' => -10,
);
function theme_panopoly_demo_dark_blue_background_render_pane($vars) {
$content = $vars['content'];
$pane = $vars['pane'];
$display = $vars['display'];
$plugin = $vars['style'];
$content->css_class = (!empty($content->css_class) ? $content->css_class . ' ' : '') . 'pane-dark-blue-background';
return theme('panels_pane', array(
'content' => $content,
'pane' => $pane,
'display' => $display,
));
}
function theme_panopoly_demo_dark_blue_background_render_region($vars) {
$display = $vars['display'];
$region_id = $vars['region_id'];
$panes = $vars['panes'];
$settings = $vars['settings'];
$output = '';
$output .= '<div class="region region-' . $vars['region_id'] . ' region-dark-blue-background">';
$output .= implode('<div class="panel-separator"></div>', $panes);
$output .= '</div>';
return $output;
}