function panels_mini_add_page in Panels 6.2
Same name and namespace in other branches
- 5.2 panels_mini/panels_mini.module \panels_mini_add_page()
Handle the add mini panel page.
1 string reference to 'panels_mini_add_page'
- _panels_mini_menu in panels_mini/
panels_mini.admin.inc - Implementation of hook_menu().
File
- panels_mini/
panels_mini.admin.inc, line 348 - Administrative items for the panels mini module.
Code
function panels_mini_add_page($layout = NULL) {
panels_load_include('plugins');
$layouts = panels_get_layouts();
$output = '';
if ($layout === NULL) {
foreach ($layouts as $id => $layout) {
$output .= panels_print_layout_link($id, $layout, $_GET['q'] . '/' . $id);
}
return $output;
}
if (!$layouts[$layout]) {
return drupal_not_found();
}
$panel_mini = new stdClass();
$panel_mini->display = panels_new_display();
$panel_mini->display->layout = $layout;
$panel_mini->pid = 'new';
$panel_mini->did = 'new';
$panel_mini->title = '';
$panel_mini->name = '';
$panel_mini->category = '';
drupal_set_title(t('Add mini panel'));
return panels_mini_edit($panel_mini);
}