function stats_display_main
Search API
7.x stats.module | stats_display_main() |
6.x stats.module | stats_display_main() |
4.x stats.module | stats_display_main() |
5.x stats.module | stats_display_main() |
Main menu screen for this module.
We will simply display the "menu block" for "stats/reports". That is, any path that begins with stats/reports will show up here.
You can create a report in your custom module, and as long as the url begins with stats/reports, and the menu item is of type "MENU_TYPE_NORMAL_ITEM" it will appear on this page. Set the weight to be > 1000 to appear below this list, set weight < 100 to appear above.
Return value
unknown
File
- modules/
stats/ stats.module, line 1505 - This module displays statistics and reports for FlightPath
Code
function stats_display_main() {
$rtn = "";
$rtn .= "<div class='stats-main-menu' style='font-size:1.2em;'>";
$rtn .= fp_render_menu_block("System Reports", "stats/reports");
$rtn .= "</div>";
// If we have other reports which have been exposed using the hook_stats_additional_menublocks function,
// display them here.
$reports = invoke_hook('stats_additional_menublocks');
if ($reports) {
foreach ($reports as $module_name => $temp) {
$rtn .= "<div class='stats-main-menu stats-additional-menublocks' style='font-size:1.2em;'>";
foreach ($reports [$module_name] as $title => $menu_block_path) {
$rtn .= fp_render_menu_block($title, $menu_block_path);
}
$rtn .= "</div>";
}
}
return $rtn;
}