Bug 24149: Add Koha::Statistic->item

Sponsored-by: Association KohaLa - https://koha-fr.org/
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2019-11-26 19:44:47 +01:00 committed by Martin Renvoize
parent 346d6031db
commit e737f46c39
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 14 additions and 0 deletions

View File

@ -20,6 +20,7 @@ use Modern::Perl;
use Carp;
use Koha::Database;
use Koha::Items;
use base qw(Koha::Object);
@ -31,6 +32,19 @@ Koha::Statistic - Koha Statistic Object class
=head2 Class methods
=head3 item
my $item = $statistic->item;
Return the item associated to this statistic.
=cut
sub item {
my ( $self ) = @_;
return Koha::Items->find( $self->itemnumber );
}
=head2 Internal methods
=head3 _type