From 628cb05a66b036dc9751cdc12c1c4351a2dcac2a 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 --- Koha/Biblio.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index d8c1c76a71..1627d235c3 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; @@ -1530,6 +1531,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.41.0