You are here

function forena_my_reports_block in Forena Reports 6.2

Same name and namespace in other branches
  1. 8 forena.common.inc \forena_my_reports_block()
  2. 6 forena.common.inc \forena_my_reports_block()
  3. 7.5 forena.common.inc \forena_my_reports_block()
  4. 7 forena.common.inc \forena_my_reports_block()
  5. 7.2 forena.common.inc \forena_my_reports_block()
  6. 7.3 forena.common.inc \forena_my_reports_block()
  7. 7.4 forena.common.inc \forena_my_reports_block()

Render the my reports category block

1 call to forena_my_reports_block()
forena_block in ./forena.module
Implementation of hook_block

File

./forena.common.inc, line 365
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;
}