|
Lines 28-33
sub field {
Link Here
|
| 28 |
return Koha::AdditionalField->_new_from_dbic( $self->_result()->field() ); |
28 |
return Koha::AdditionalField->_new_from_dbic( $self->_result()->field() ); |
| 29 |
} |
29 |
} |
| 30 |
|
30 |
|
|
|
31 |
=head3 to_api |
| 32 |
|
| 33 |
Overloaded to_api method to exclude internal fields from API representation |
| 34 |
|
| 35 |
=cut |
| 36 |
|
| 37 |
sub to_api { |
| 38 |
my ( $self, $params ) = @_; |
| 39 |
|
| 40 |
my $json = $self->SUPER::to_api($params); |
| 41 |
|
| 42 |
# Remove internal database optimization fields that shouldn't be exposed via API |
| 43 |
delete $json->{record_table}; |
| 44 |
|
| 45 |
return $json; |
| 46 |
} |
| 47 |
|
| 31 |
=head2 Internal methods |
48 |
=head2 Internal methods |
| 32 |
|
49 |
|
| 33 |
=head3 _type |
50 |
=head3 _type |
| 34 |
- |
|
|