sumTable($subTable); } } /** * Reset this row to an empty one and sum the associated subtable again. */ public function recalculate() { $id = $this->getIdSubDataTable(); if ($id !== null) { $subtable = Piwik_DataTable_Manager::getInstance()->getTable($id); $this->sumTable($subtable); } } /** * Sums a tables row with this one. * * @param Piwik_DataTable $table */ private function sumTable($table) { foreach ($table->getRows() as $row) { $this->sumRow($row, $enableCopyMetadata = false, $table->getColumnAggregationOperations()); } } }