From d822e687d28ae8d5c5451cf0e09937d60967dd3c 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 Signed-off-by: Jonathan Druart Signed-off-by: Marcel de Rooy 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 dc3d044bd3..706ddba69e 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.39.5