function forena_user_reports in Forena Reports 8
Same name and namespace in other branches
- 6.2 forena.module \forena_user_reports()
- 6 forena.module \forena_user_reports()
- 7.5 forena.module \forena_user_reports()
- 7 forena.module \forena_user_reports()
- 7.2 forena.module \forena_user_reports()
- 7.3 forena.module \forena_user_reports()
- 7.4 forena.module \forena_user_reports()
1 call to forena_user_reports()
- FrxMyReports::render in src/
FrxPlugin/ Renderer/ FrxMyReports.php - Default Render action, which simply does normal forena rendering. You can use renderDomNode at any time to generate the default forena rendering methods.
File
- ./
forena.module, line 81
Code
function forena_user_reports($category = '') {
require_once 'forena.common.inc';
$output = '';
$categories = forena_get_user_reports($category);
$report_repos = \Drupal::config('forena.settings')
->get('forena_path');
if (!$categories) {
$output = 'No Reports Found';
}
$links = '';
foreach ($categories as $category => $reports) {
$links .= '<li><a href="#' . urlencode($category) . '">' . $category . '</a></li> ';
$output .= '<h3 id="' . urlencode($category) . '">' . $category . '</h3>';
$output .= '<ul>';
foreach ($reports as $r) {
// @FIXME Provide a valid URL, generated from a route name, as the second argument to l(). See https://www.drupal.org/node/2346779 for more information.
// $output .= '<li>' . l($r['title'], $report_repos . '/' . str_replace('/', '.', $r['report_name'])) . '</li>';
}
$output .= '</ul>';
}
return $output;
}