private function loadSubtable(DataTable $table, Row $row)
{
$idSubtable = $row->getIdSubDataTable();
if ($idSubtable === null) {
return null;
}
$subtable = $row->getSubtable();
if (!$subtable) {
$subtable = $this->thisReport->fetchSubtable($idSubtable, $this->getRequestParamOverride($table));
}
if (!$subtable) {
// sanity check
throw new Exception("Unexpected error: could not load subtable '{$idSubtable}'.");
}
return $subtable;
}