Newer
Older
mattpiwik
a validé
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
foreach($array as $label => $row)
{
// we make sure that the label column is first in the list!
// important for the UI javascript mainly...
// array_merge doesn't work here as it reindex the numeric value
// see the test testMergeArray in PHP_Related.test.php
$cleanRow[Piwik_DataTable_Row::COLUMNS] = array('label' => $label) + $row;
if(!is_null($subtablePerLabel)
// some rows of this table don't have subtables
// (for examplecase of the campaign without keywords )
&& isset($subtablePerLabel[$label])
)
{
$cleanRow[Piwik_DataTable_Row::DATATABLE_ASSOCIATED] = $subtablePerLabel[$label];
}
$this->addRow( new Piwik_DataTable_Row($cleanRow) );
}
}
/**
* At destruction we try to free memory
* But php doesn't give us much control on this
*/
public function __destruct()
{
unset($this->rows);
}
}