mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
52ed342fc2
commit
30f8c74283
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user