function forena_my_reports_block in Forena Reports 7.4
Same name and namespace in other branches
- 8 forena.common.inc \forena_my_reports_block()
- 6.2 forena.common.inc \forena_my_reports_block()
- 6 forena.common.inc \forena_my_reports_block()
- 7.5 forena.common.inc \forena_my_reports_block()
- 7 forena.common.inc \forena_my_reports_block()
- 7.2 forena.common.inc \forena_my_reports_block()
- 7.3 forena.common.inc \forena_my_reports_block()
Render the my reports category block
1 call to forena_my_reports_block()
- forena_block_view in ./
forena.module - Implementation of hook_block_view
File
- ./
forena.common.inc, line 155 - Common functions used throughout the project but loaded in this file to keep the module file lean.
Code
function forena_my_reports_block() {
$reports = forena_get_user_reports();
if (!$reports) {
return '';
}
$output = '<ul>';
foreach ($reports as $category => $reports) {
$output .= '<li>' . l($category, 'forena', array(
'fragment' => urlencode($category),
)) . '</li>';
}
$output .= '</ul>';
return $output;
}