function FrxSVGGraph::generateTable in Forena Reports 7.4
Generate a basic table.
Parameters
unknown $xml:
unknown $config:
unknown $div:
1 call to FrxSVGGraph::generateTable()
- FrxSVGGraph::generate in renderers/
FrxSVGGraph.inc - Generate the template from the configuration.
File
- renderers/
FrxSVGGraph.inc, line 699
Class
Code
function generateTable($xml, &$config, &$div) {
$attrs = array(
'foreach' => '*',
);
$table = $this
->setFirstNode($div, 4, 'table');
if (@$config['caption']) {
$this
->setFirstNode($table, 6, 'caption', $config['caption']);
}
$thead = $this
->setFirstNode($table, 6, 'thead');
$throw = $this
->setFirstNode($thead, 8, 'tr');
$tbody = $this
->setFirstNode($table, 6, 'tbody');
$tdrow = $this
->setFirstNode($tbody, 8, 'tr', NULL, array(), $attrs);
if (isset($config['crosstab_columns'])) {
foreach ($config['crosstab_columns'] as $key => $col) {
if ($col['type'] != 'ignore') {
$this
->addNode($throw, 10, 'th', $col['label']);
$this
->addNode($tdrow, 10, 'td', $col['contents']);
}
}
}
}