Bug 26265: (QA follow-up) Remove g option from regex, add few dirs
[koha.git] / Koha / Illcomment.pm
1 package Koha::Illcomment;
2
3 # Copyright Magnus Enger Libriotech 2017
4 #
5 # This file is part of Koha.
6 #
7 # Koha is free software; you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 3 of the License, or (at your option) any later
10 # version.
11 #
12 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
15 # details.
16 #
17 # You should have received a copy of the GNU General Public License along with
18 # Koha; if not, write to the Free Software Foundation, Inc., 51 Franklin
19 # Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
21 use Modern::Perl;
22 use Koha::Database;
23 use base qw(Koha::Object);
24
25 =head1 NAME
26
27 Koha::Illcomment - Koha Illcomment Object class
28
29 =head2 Class methods
30
31 =head3 patron
32
33     my $patron = Koha::Illcomment->patron;
34
35 Return the patron object associated with this comment
36
37 =cut
38
39 sub patron {
40     my ( $self ) = @_;
41     return Koha::Patron->_new_from_dbic(
42         scalar $self->_result->borrowernumber
43     );
44 }
45
46 =head2 Internal methods
47
48 =head3 _type
49
50     my $type = Koha::IllComment->_type;
51
52 Return this object's type
53
54 =cut
55
56 sub _type {
57     return 'Illcomment';
58 }
59
60 =head1 AUTHOR
61
62 Magnus Enger <magnus@libriotech.no>
63
64 =cut
65
66 1;