function menu_minipanels_panels in Menu Minipanels 7
Same name and namespace in other branches
- 6 menu_minipanels.module \menu_minipanels_panels()
Stores the generated output of all rendered minipanels. Will later be used by @menu_minipanels_preprocess_page to display the generated output.
Parameters
Int $mlid - the menu item id that needs the minipanel rendered.:
String $minipanel_name - the name of the minipanel to render.:
2 calls to menu_minipanels_panels()
- menu_minipanels_page_alter in ./
menu_minipanels.module - Implements hook_page_alter().
- _menu_minipanels_include in ./
menu_minipanels.module - When a minipanel menu item is detected by our theme interception functions this function is used to add the appropriate configuration javascript and minipanel output.
File
- ./
menu_minipanels.module, line 326 - Allows an administrator to specify a minipanel to be associated with a Drupal menu item. When that menu item is hovered or clicked (as per config), the minipanel content will be shown using the qTip javascript library.
Code
function menu_minipanels_panels($mlid = NULL, $minipanel_name = NULL) {
static $panels = array();
if ($minipanel_name != NULL) {
$panel = panels_mini_block_view($minipanel_name);
// Convert the block to a render array.
$panel['#markup'] = $panel['content'];
unset($panel['content']);
unset($panel['subject']);
// Wrap the minipanel.
$panel['#prefix'] = '<div class="menu-minipanels menu-minipanel-' . $mlid . '">';
$panel['#suffix'] = '</div>';
$panels[] = $panel;
}
else {
return $panels;
}
}