diff --git a/model/ArrayList.php b/model/ArrayList.php index 6588c0580..0df9e7c2f 100644 --- a/model/ArrayList.php +++ b/model/ArrayList.php @@ -34,6 +34,13 @@ class ArrayList extends ViewableData implements SS_List { $this->items = $items; parent::__construct(); } + + /** + * Return the class of items in this list, by looking at the first item inside it. + */ + function dataClass() { + if(count($this->items) > 0) return get_class($this->items[0]); + } /** * Return the number of items in this list