You are here

public function FrxTemplate::generate in Forena Reports 7.3

Same name and namespace in other branches
  1. 6.2 templates/FrxTemplate.inc \FrxTemplate::generate()
  2. 7.2 templates/FrxTemplate.inc \FrxTemplate::generate()

Enter description here ...

Parameters

string $data_block:

SimpleXMLElement $xml:

array $config:

5 methods override FrxTemplate::generate()
FrxEmailMerge::generate in templates/FrxEmailMerge.inc
Enter description here ...
FrxFieldTable::generate in templates/FrxFieldTable.inc
Enter description here ...
FrxGraphTemplate::generate in templates/FrxGraphTemplate.inc
Enter description here ...
FrxRptInclude::generate in templates/FrxRptInclude.inc
Enter description here ...
FrxTable::generate in templates/FrxTable.inc
Enter description here ...

File

templates/FrxTemplate.inc, line 202
FrxTemplate Base Class for all tmeplates. By default simply renders a document with all the possible tokens in it. @author davidmetzler

Class

FrxTemplate
@file FrxTemplate Base Class for all tmeplates. By default simply renders a document with all the possible tokens in it. @author davidmetzler

Code

public function generate($xml, $config) {
  if (!@$config['foreach']) {
    $config['foreach'] = '*';
  }
  $columns = $this
    ->columns($xml);
  $text = '';
  if ($columns) {
    foreach ($columns as $col) {
      $text .= ' {' . $col . '}';
    }
  }
  $this
    ->blockDiv($config, $text);
}