From c00a5c2c01d9ab81ed5d88be0d60e5690da4d6ca Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 19 Nov 2021 09:37:38 -0300 Subject: [PATCH] Bug 29523: Add Koha::Objects->search_limited stub method This method is just a passthru to the search method. It is defined here to avoid the need to check if each class implements it. Signed-off-by: Tomas Cohen Arazi Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- Koha/Objects.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Koha/Objects.pm b/Koha/Objects.pm index 133d0cb08e..9a2eeb2d89 100644 --- a/Koha/Objects.pm +++ b/Koha/Objects.pm @@ -142,6 +142,21 @@ sub search { return $class->_new_from_dbic($rs); } +=head3 search_limited + + my $rs = $self->search_limited + +Generic method that is just a pass through for I. It is expected to be overloaded +locally on classes. It's main purpose is to avoid the need to check if the class implements +the method locally. + +=cut + +sub search_limited { + my ( $self, $params, $attributes ) = @_; + return $self->search( $params, $attributes ); +} + =head3 search_related my $objects = Koha::Objects->search_related( $rel_name, $cond?, \%attrs? ); -- 2.20.1