From 9c813f84ff5b8abca32d63b5ab45332b6c862270 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 --- Koha/Objects.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Koha/Objects.pm b/Koha/Objects.pm index 3ee0a55742..54fce97479 100644 --- a/Koha/Objects.pm +++ b/Koha/Objects.pm @@ -155,6 +155,21 @@ sub search { } } +=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