From e0140072f6e577f5c38a20878b5f2e9e947d50cd Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 8 Jun 2023 11:58:51 +0200 Subject: [PATCH] Bug 33953: Koha::Biblio->ratings Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- Koha/Biblio.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index 1e468c57e7..6d2116b39f 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -44,6 +44,7 @@ use Koha::Item::Transfer::Limits; use Koha::Items; use Koha::Libraries; use Koha::Old::Checkouts; +use Koha::Ratings; use Koha::Recalls; use Koha::RecordProcessor; use Koha::Suggestions; @@ -1550,6 +1551,20 @@ sub can_be_recalled { return @items; } +=head3 ratings + + my $ratings = $biblio->ratings + +Return a Koha::Ratings object representing the ratings of this bibliographic record + +=cut + +sub ratings { + my ( $self ) = @_; + my $rs = $self->_result->ratings; + return Koha::Ratings->_new_from_dbic($rs); +} + =head2 Internal methods =head3 type -- 2.39.5