From 3ee051c7067d40327ccfe09e59881d877a99b4c1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 4 Nov 2016 13:47:21 +0000 Subject: [PATCH] Bug 17552: Revert "Bug 17091: Remove explicit declaration of Koha::Objects->reset" This reverts commit c253af2e519570c4024891dc4d1e81743a2c5fc2. Signed-off-by: Josef Moravec Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall --- Koha/Objects.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Koha/Objects.pm b/Koha/Objects.pm index 176821af73..da2f2c969d 100644 --- a/Koha/Objects.pm +++ b/Koha/Objects.pm @@ -181,6 +181,23 @@ sub next { return $object; } +=head3 Koha::Objects->reset(); + +Koha::Objects->reset(); + +resets iteration so the next call to next() will start agein +with the first object in a set. + +=cut + +sub reset { + my ( $self ) = @_; + + $self->_resultset()->reset(); + + return $self; +} + =head3 Koha::Objects->as_list(); Koha::Objects->as_list(); -- 2.39.5