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

(-)a/Koha/Item.pm (-3 lines)
Lines 2081-2089 sub strings_map { Link Here
2081
2081
2082
    my ( $itemtagfield, $itemtagsubfield ) = C4::Biblio::GetMarcFromKohaField("items.itemnumber");
2082
    my ( $itemtagfield, $itemtagsubfield ) = C4::Biblio::GetMarcFromKohaField("items.itemnumber");
2083
2083
2084
    my $public_read_list = $params->{public} ? $self->public_read_list : [];
2085
    my $to_api_mapping   = $self->to_api_mapping;
2086
2087
    # Hardcoded known 'authorised_value' values mapped to API codes
2084
    # Hardcoded known 'authorised_value' values mapped to API codes
2088
    my $code_to_type = {
2085
    my $code_to_type = {
2089
        branches  => 'library',
2086
        branches  => 'library',
(-)a/Koha/Object.pm (-4 / +2 lines)
Lines 678-692 sub to_api_mapping { Link Here
678
678
679
=head3 strings_map
679
=head3 strings_map
680
680
681
    my $params = { is_public => 1 };
682
    my $string_map = $object->strings_map($params);
681
    my $string_map = $object->strings_map($params);
683
682
684
Generic method that returns the string map for coded attributes.
683
Generic method that returns the string map for coded attributes.
685
684
686
Return should be a hashref keyed on database field name with the values
685
Return should be a hashref keyed on database field name with the values
687
being hashrefs containing 'str', 'type' and optionally 'category'. 
686
being hashrefs containing 'str', 'type' and optionally 'category'.
688
687
689
This is then use in to_api to render the _strings embed when requested.
688
This is then used in to_api to render the _strings embed when requested.
690
689
691
Note: this only returns an empty I<hashref>. Each class should have its
690
Note: this only returns an empty I<hashref>. Each class should have its
692
own mapping returned.
691
own mapping returned.
693
- 

Return to bug 33161