public function ReportManager::reportInclude in Forena Reports 8
Generate a forena report
Parameters
$base_name:
File
- src/
ReportManager.php, line 122 - Implements \Drupal\forena\File\ReportFileSystem
Class
- ReportManager
- Access to Report rendering engine.
Namespace
Drupal\forenaCode
public function reportInclude($report_name) {
$format = $this
->formatFromPath($report_name);
$base_name = $report_name;
//@TODO: report loading based on language
$file_name = str_replace('.', '/', $report_name) . '.frx';
$r = ReportFileSystem::instance();
// Find out if the report exists
if ($r
->exists($file_name)) {
$frx = $r
->contents($file_name);
$r = new Report($frx);
$r
->render($format);
}
}