From cc3e500f82867a48caf4c3cbd0981544290ee618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Martins?= Date: Fri, 30 Nov 2012 01:37:36 +0000 Subject: [PATCH] return $this, for do things like this: new DropdownField('XPTOName', 'XPTO Label', XPTOModel::get()->map("ID", "Name")->unshift(0,'- Select -')) This does not break anything and makes things more natural --- model/Map.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model/Map.php b/model/Map.php index d2cf4f456..c2d3a15cc 100644 --- a/model/Map.php +++ b/model/Map.php @@ -77,6 +77,8 @@ class SS_Map implements ArrayAccess, Countable, IteratorAggregate { $oldItems = $this->firstItems; $this->firstItems = array($key => $value); if($oldItems) $this->firstItems = $this->firstItems + $oldItems; + + return $this; } // ArrayAccess