Bug 24418: Add Koha::Biblio->suggestions

This patch adds the mentioned accessor. To test:

1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass
3. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Tomás Cohen Arazi 2020-01-14 10:09:40 -03:00 committed by Martin Renvoize
parent c0e2912ee6
commit 8d2642d33e
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -40,6 +40,7 @@ use Koha::IssuingRules;
use Koha::Item::Transfer::Limits;
use Koha::Items;
use Koha::Libraries;
use Koha::Suggestions;
use Koha::Subscriptions;
=head1 NAME
@ -439,6 +440,21 @@ sub biblioitem {
return $self->{_biblioitem};
}
=head3 suggestions
my $suggestions = $self->suggestions
Returns the related Koha::Suggestions object for this Biblio object
=cut
sub suggestions {
my ($self) = @_;
my $suggestions_rs = $self->_result->suggestions;
return Koha::Suggestions->_new_from_dbic( $suggestions_rs );
}
=head3 subscriptions
my $subscriptions = $self->subscriptions