/**
* Computes the output for the given data table
*
* @param DataTable $table
* @return string
*/
protected function renderTable($table)
{
if (is_array($table)) {
$table = DataTable::makeFromSimpleArray($table);
}
if ($table instanceof DataTable\Map) {
foreach ($table->getDataTables() as $date => $subtable) {
if ($subtable->getRowsCount()) {
$this->buildTableStructure($subtable, '_' . $table->getKeyName(), $date);
}
}
} else {
if ($table->getRowsCount()) {
$this->buildTableStructure($table);
}
}
$out = $this->renderDataTable();
return $out;
}