diff --git a/model/ArrayList.php b/model/ArrayList.php
index c339dd279..c981d2b56 100644
--- a/model/ArrayList.php
+++ b/model/ArrayList.php
@@ -33,6 +33,15 @@ class ArrayList extends ViewableData implements SS_List {
return $this->items;
}
+ public function debug() {
+ $val = "
" . $this->class . "
";
+ foreach($this->toNestedArray() as $item) {
+ $val .= "- " . Debug::text($item) . "
";
+ }
+ $val .= "
";
+ return $val;
+ }
+
public function toNestedArray() {
$result = array();
diff --git a/model/DataList.php b/model/DataList.php
index e26774094..d1c27c5fb 100644
--- a/model/DataList.php
+++ b/model/DataList.php
@@ -152,6 +152,15 @@ class DataList extends ViewableData implements SS_List {
return $result;
}
+ public function debug() {
+ $val = "" . $this->class . "
";
+ foreach($this->toNestedArray() as $item) {
+ $val .= "- " . Debug::text($item) . "
";
+ }
+ $val .= "
";
+ return $val;
+ }
+
public function map($keyField = 'ID', $titleField = 'Title') {
return new SS_Map($this, $keyField, $titleField);
}