You are here

function FrxReportGenerator::get_templates in Forena Reports 6.2

Same name and namespace in other branches
  1. 7.2 FrxReportGenerator.inc \FrxReportGenerator::get_templates()
  2. 7.3 FrxReportGenerator.inc \FrxReportGenerator::get_templates()
  3. 7.4 FrxReportGenerator.inc \FrxReportGenerator::get_templates()

Returns an object of the template class that has a method named templates.

If it fails it returns a 0;

File

./FrxReportGenerator.inc, line 557
Common functions used throughout the project but loaded in this file to keep the module file lean.

Class

FrxReportGenerator

Code

function get_templates($fkey) {
  $templates = $this
    ->supported_templates();
  if (class_exists($fkey)) {
    return new $fkey();
  }
}