Bug 33953: Koha::Biblio->ratings

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2023-06-08 11:58:51 +02:00 committed by Tomas Cohen Arazi
parent d5ded8684d
commit e0140072f6
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -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