Bug 19186: (QA follow-up) Insert syspref SelfCheckoutByLogin if missing
[koha.git] / Koha / Authority.pm
blobac2b25c310e10c10c22c559eba47388b85c9bc4d
1 package Koha::Authority;
3 # Copyright 2015 Koha Development Team
5 # This file is part of Koha.
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.
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 FOR
14 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along
17 # with Koha; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 use Modern::Perl;
22 use base qw(Koha::Object);
23 use Koha::SearchEngine::Search;
25 =head1 NAME
27 Koha::Authority - Koha Authority Object class
29 =head1 API
31 =head2 Instance Methods
33 =head3 get_usage_count
35 $count = $self->get_usage_count;
37 Returns the number of linked biblio records.
39 =cut
41 sub get_usage_count {
42 my ( $self ) = @_;
43 return Koha::Authorities->get_usage_count({ authid => $self->authid });
46 =head3 linked_biblionumbers
48 my @biblios = $self->linked_biblionumbers({
49 [ max_results => $max ], [ offset => $offset ],
50 });
52 Returns an array of biblionumbers.
54 =cut
56 sub linked_biblionumbers {
57 my ( $self, $params ) = @_;
58 $params->{authid} = $self->authid;
59 return Koha::Authorities->linked_biblionumbers( $params );
62 =head2 Class Methods
64 =head3 type
66 =cut
68 sub _type {
69 return 'AuthHeader';