Line 0
Link Here
|
0 |
- |
1 |
package Koha::ILL::Backends; |
|
|
2 |
|
3 |
# Copyright PTFS Europe 2023 |
4 |
# |
5 |
# This file is part of Koha. |
6 |
# |
7 |
# Koha is free software; you can redistribute it and/or modify it |
8 |
# under the terms of the GNU General Public License as published by |
9 |
# the Free Software Foundation; either version 3 of the License, or |
10 |
# (at your option) any later version. |
11 |
# |
12 |
# Koha is distributed in the hope that it will be useful, but |
13 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
14 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 |
# GNU General Public License for more details. |
16 |
# |
17 |
# You should have received a copy of the GNU General Public License |
18 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
19 |
|
20 |
use Modern::Perl; |
21 |
|
22 |
use base qw(Koha::Objects); |
23 |
|
24 |
=head1 NAME |
25 |
|
26 |
Koha::ILL::Backends - Koha Illbackends Object class |
27 |
|
28 |
=head2 Class methods |
29 |
|
30 |
=head3 new |
31 |
|
32 |
New ILL Backend |
33 |
|
34 |
=cut |
35 |
|
36 |
sub new { |
37 |
my $class = shift; |
38 |
my $self = {}; |
39 |
return bless $self, $class; |
40 |
} |
41 |
|
42 |
=head3 installed_backends |
43 |
|
44 |
Return a list of installed backends. |
45 |
|
46 |
=cut |
47 |
|
48 |
sub installed_backends { |
49 |
my $backends = Koha::ILL::Request::Config->new->available_backends; |
50 |
my @installed = grep { !/Standard/ } @{$backends}; |
51 |
return \@installed; |
52 |
} |
53 |
|
54 |
=head2 Internal methods |
55 |
|
56 |
=head3 _type |
57 |
|
58 |
my $type = Koha::ILL::Backend->_type; |
59 |
|
60 |
Return this object's type |
61 |
|
62 |
=cut |
63 |
|
64 |
sub _type { |
65 |
return 'Illbackend'; |
66 |
} |
67 |
|
68 |
=head1 AUTHOR |
69 |
|
70 |
Pedro Amorim <pedro.amorim@ptfs-europe.com> |
71 |
|
72 |
=cut |
73 |
|
74 |
1; |