function panels_mini_content in Panels 5.2
Same name and namespace in other branches
- 6.2 panels_mini/panels_mini.module \panels_mini_content()
Render a mini panel called from a panels display.
1 string reference to 'panels_mini_content'
- panels_mini_panels_content_types in panels_mini/
panels_mini.module - Expose all mini panels to our own system.
File
- panels_mini/
panels_mini.module, line 902 - panels_mini.module
Code
function panels_mini_content($conf, $panel_args, &$contexts) {
$mini = panels_mini_load($conf['name']);
if (!$mini) {
return FALSE;
}
panels_load_include('plugins');
// Load up any contexts we might be using.
$context = panels_context_match_required_contexts($mini->requiredcontexts, $contexts);
$mini->context = $mini->display->context = panels_context_load_contexts($mini, FALSE, $context);
if (empty($mini) || !empty($mini->disabled)) {
return;
}
$mini->display->args = $panel_args;
$mini->display->css_id = panels_mini_get_id($conf['name']);
$mini->display->owner = $mini;
// unique ID of this mini.
$mini->display->owner->id = $mini->name;
$block = new stdClass();
$block->module = 'panels_mini';
$block->delta = $conf['name'];
$block->content = panels_render_display($mini->display);
if (!$mini->hide_title) {
$block->subject = filter_xss_admin($mini->title);
}
return $block;
}