View | Details | Raw Unified | Return to bug 32711
Collapse All | Expand All

(-)a/Koha/Biblio.pm (-1 / +17 lines)
Lines 1264-1269 sub normalized_isbn { Link Here
1264
    return C4::Koha::GetNormalizedISBN($self->biblioitem->isbn);
1264
    return C4::Koha::GetNormalizedISBN($self->biblioitem->isbn);
1265
}
1265
}
1266
1266
1267
=head3 public_read_list
1268
1269
This method returns the list of publicly readable database fields for both API and UI output purposes
1270
1271
=cut
1272
1273
sub public_read_list {
1274
    return [
1275
        'biblionumber',   'frameworkcode',   'author',
1276
        'title',          'medium',          'subtitle',
1277
        'part_number',    'part_name',       'unititle',
1278
        'notes',          'serial',          'seriestitle',
1279
        'copyrightdate',  'abstract'
1280
    ];
1281
}
1282
1267
=head3 to_api
1283
=head3 to_api
1268
1284
1269
    my $json = $biblio->to_api;
1285
    my $json = $biblio->to_api;
Lines 1278-1284 sub to_api { Link Here
1278
    my ($self, $args) = @_;
1294
    my ($self, $args) = @_;
1279
1295
1280
    my $response = $self->SUPER::to_api( $args );
1296
    my $response = $self->SUPER::to_api( $args );
1281
    my $biblioitem = $self->biblioitem->to_api;
1297
    my $biblioitem = $self->biblioitem->to_api( $args );
1282
1298
1283
    return { %$response, %$biblioitem };
1299
    return { %$response, %$biblioitem };
1284
}
1300
}
(-)a/Koha/Biblioitem.pm (-2 / +20 lines)
Lines 30-35 Koha::Biblioitem - Koha Biblioitem Object class Link Here
30
30
31
=head2 Class methods
31
=head2 Class methods
32
32
33
=head3 public_read_list
34
35
This method returns the list of publicly readable database fields for both API and UI output purposes
36
37
=cut
38
39
sub public_read_list {
40
    return [
41
        'volume',           'number',                'isbn',
42
        'issn',             'ean',                   'publicationyear',
43
        'publishercode',    'volumedate',            'columedesc',
44
        'collectiontitle',  'collectionissn',        'collectionvolume',
45
        'editionstatement', 'editionresponsibility', 'pages',
46
        'place',            'lccn',                  'url',
47
        'cn_source',        'cn_class',              'cn)item',
48
        'cn_suffix',        'cn_sort',               'agerestriction',
49
        'totalissues'
50
    ];
51
}
52
33
=head3 to_api_mapping
53
=head3 to_api_mapping
34
54
35
This method returns the mapping for representing a Koha::Biblioitem object
55
This method returns the mapping for representing a Koha::Biblioitem object
Lines 57-63 sub to_api_mapping { Link Here
57
        totalissues      => 'serial_total_issues',
77
        totalissues      => 'serial_total_issues',
58
        volumedate       => 'volume_date',
78
        volumedate       => 'volume_date',
59
        volumedesc       => 'volume_description',
79
        volumedesc       => 'volume_description',
60
61
    };
80
    };
62
}
81
}
63
82
64
- 

Return to bug 32711