1 package Koha::AdditionalField;
5 Koha::AdditionalField - Koha::Object derived class for additional fields
11 use base qw(Koha::Object);
14 use Koha::MarcSubfieldStructures;
18 =head2 effective_authorised_value_category
20 Returns the authorised value category of the additional field or the authorised
21 value category of the MARC field, if any.
23 my $av_category = $additional_field->effective_authorised_value_category;
27 sub effective_authorised_value_category {
30 my $category = $self->authorised_value_category;
32 if ($self->marcfield) {
33 my ($tag, $subfield) = split /\$/, $self->marcfield;
35 my $mss = Koha::MarcSubfieldStructures->find('', $tag, $subfield);
37 $category = $mss->authorised_value;
45 sub _type { 'AdditionalField' }
49 Koha Development Team <http://koha-community.org/>
51 =head1 COPYRIGHT AND LICENSE
53 Copyright 2013, 2018 BibLibre
55 This file is part of Koha.
57 Koha is free software; you can redistribute it and/or modify it under the
58 terms of the GNU General Public License as published by the Free Software
59 Foundation; either version 3 of the License, or (at your option) any later
62 Koha is distributed in the hope that it will be useful, but WITHOUT ANY
63 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
64 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
66 You should have received a copy of the GNU General Public License along
67 with Koha; if not, see <http://www.gnu.org/licenses>.