From c4dde9022df3b2d1bbdaa6468301ddeeaccda48f Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 16 Oct 2012 18:24:40 +1300 Subject: [PATCH] NEW: Allow hashes to be passed as ArrayList items; the will be turned into ArrayData objects. --- model/ArrayList.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/model/ArrayList.php b/model/ArrayList.php index 4335b405c..cd1a203d0 100644 --- a/model/ArrayList.php +++ b/model/ArrayList.php @@ -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); }