mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
NEW: Allow hashes to be passed as ArrayList items; the will be turned into ArrayData objects.
This commit is contained in:
parent
9a2ba483df
commit
c4dde9022d
@ -55,6 +55,9 @@ class ArrayList extends ViewableData implements SS_List, SS_Filterable, SS_Sorta
|
||||
* @return ArrayIterator
|
||||
*/
|
||||
public function getIterator() {
|
||||
foreach($this->items as $i => $item) {
|
||||
if(is_array($item)) $this->items[$i] = new ArrayData($item);
|
||||
}
|
||||
return new ArrayIterator($this->items);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user