API CHANGE Removed DataObjectSet->consolidate(), use DataObjectSet->toNestedArray()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65068 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-11-02 00:57:25 +00:00
parent 52ed342fc2
commit 30f8c74283

View File

@ -88,24 +88,6 @@ class DataObjectSet extends ViewableData implements IteratorAggregate {
}
parent::__construct();
}
/**
* Consolidate the DataObjectSet into an array of arrays
* The array will contain the field values of the specified fields
* @param array|string $args,... The field names, either as an array, or as multiple strings.
* @return array
*/
public function consolidate($args) {
$fieldList = is_array($args) ? $args : func_get_args();
foreach($this as $record) {
$outputRow = null;
foreach($fieldList as $field) {
$outputRow[] = $record->$field;
}
$output[] = $outputRow;
}
return $output;
}
/**
* Destory all of the DataObjects in this set.