From 93eb2dda546f8f5cf75fd4d3ba94a3f43cc66e82 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 9 Jan 2012 18:47:59 +1300 Subject: [PATCH] API CHANGE: Added ArrayList::byID(), to improve its compatibility with DataList. --- model/ArrayList.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/model/ArrayList.php b/model/ArrayList.php index fc783a4f9..6588c0580 100644 --- a/model/ArrayList.php +++ b/model/ArrayList.php @@ -400,6 +400,10 @@ class ArrayList extends ViewableData implements SS_List { $this->items = $itemsToKeep; return $this; } + + public function byID($id) { + return $this->filter("ID", $id)->First(); + } /** * Exclude the list to not contain items with these charactaristics