function panels_get_panel_style_and_settings in Panels 6.2
Same name and namespace in other branches
- 5.2 panels.module \panels_get_panel_style_and_settings()
- 6.3 includes/display-render.inc \panels_get_panel_style_and_settings()
Given a display and the id of a panel, get the style in which to render that panel.
1 call to panels_get_panel_style_and_settings()
- panels_render_panel in includes/
display-render.inc - 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.
File
- includes/
display-render.inc, line 259 - Contains Panels display rendering functions.
Code
function panels_get_panel_style_and_settings($panel_settings, $panel) {
if (empty($panel_settings)) {
return array(
panels_get_style('default'),
array(),
);
}
if (empty($panel_settings['individual']) || empty($panel_settings['panel'][$panel]['style'])) {
$style = panels_get_style($panel_settings['style']);
$style_settings = isset($panel_settings['style_settings']['default']) ? $panel_settings['style_settings']['default'] : array();
}
else {
$style = panels_get_style($panel_settings['panel'][$panel]['style']);
$style_settings = isset($panel_settings['style_settings'][$panel]) ? $panel_settings['style_settings'][$panel] : array();
}
return array(
$style,
$style_settings,
);
}