[+FEATURE] Extbase (Persistence): Allow removing previously set limit with unsetLimit()
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 19 Jun 2011 15:17:18 +0000 (17:17 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 31 Jul 2011 18:39:43 +0000 (20:39 +0200)
$limit is initially unset and can be set with setLimit().
Using unsetLimit() it is possible to reset that limit now.

Change-Id: I6040c6b655439066af1716d7af07d1e0ff7bfbdc
Resolves: #27445

typo3/sysext/extbase/Classes/Persistence/Query.php

index 911d66d..d707205 100644 (file)
@@ -283,6 +283,18 @@ class Tx_Extbase_Persistence_Query implements Tx_Extbase_Persistence_QueryInterf
        }
 
        /**
+        * Resets a previously set maximum size of the result set. Returns $this to allow
+        * for chaining (fluid interface)
+        *
+        * @return Tx_Extbase_Persistence_QueryInterface
+        * @api
+        */
+       public function unsetLimit() {
+               unset($this->limit);
+               return $this;
+       }
+
+       /**
         * Returns the maximum size of the result set to limit.
         *
         * @param integer