function forena_get_report_editor in Forena Reports 7
Same name and namespace in other branches
- 6.2 forena.admin.inc \forena_get_report_editor()
- 6 forena.admin.inc \forena_get_report_editor()
- 7.2 forena.admin.inc \forena_get_report_editor()
- 7.3 forena.admin.inc \forena_get_report_editor()
Accepts the name of a file
Returns an editor object of the file.
8 calls to forena_get_report_editor()
- forena_admin_params_form in ./
forena.admin.inc - forena_admin_params_form_submit in ./
forena.admin.inc - forena_data_block_add in ./
forena.admin.inc - submit handler for forena_data_block_form. This adds the datablock to an existing report.
- forena_data_block_form in ./
forena.admin.inc - A form to preview and add data blocks to an existing report
- forena_fields_form in ./
forena.admin.inc
File
- ./
forena.admin.inc, line 253
Code
function forena_get_report_editor($report_name) {
require_once 'FrxReportEditor.inc';
if ($report_name) {
$r_text = '';
$report_path = forena_report_path();
$filename = $report_path . '/' . $report_name . '.frx';
if (file_exists($filename)) {
$r_text = file_get_contents($filename);
}
$r = new FrxReportEditor($r_text);
return $r;
}
else {
return new FrxReportEditor();
}
}