Bug 15468 - Search links on callnumbers with parentheses fails on OPAC results page
[koha.git] / Koha / Biblio.pm
blob48c959d08f5ba68c32cf89e114225a30084e5f69
1 package Koha::Biblio;
3 # Copyright ByWater Solutions 2014
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 Carp;
24 use C4::Biblio qw( GetRecordValue GetMarcBiblio GetFrameworkCode );
26 use Koha::Database;
28 use base qw(Koha::Object);
30 =head1 NAME
32 Koha::Biblio - Koha Biblio Object class
34 =head1 API
36 =head2 Class Methods
38 =cut
40 =head3 subtitles
42 my @subtitles = $biblio->subtitles();
44 Returns list of subtitles for a record.
46 Keyword to MARC mapping for subtitle must be set for this method to return any possible values.
48 =cut
50 sub subtitles {
51 my ( $self ) = @_;
53 return map { $_->{subfield} } @{ GetRecordValue( 'subtitle', GetMarcBiblio( $self->id ), $self->frameworkcode ) };
57 =head3 type
59 =cut
61 sub type {
62 return 'Biblio';
65 =head1 AUTHOR
67 Kyle M Hall <kyle@bywatersolutions.com>
69 =cut