|
Lines 33-39
Koha::Library - Koha Library Object class
Link Here
|
| 33 |
|
33 |
|
| 34 |
=head1 API |
34 |
=head1 API |
| 35 |
|
35 |
|
| 36 |
=head2 Class Methods |
36 |
=head2 Class methods |
|
|
37 |
|
| 38 |
=head3 get_categories |
| 39 |
|
| 40 |
TODO: Ask the author to add a proper description |
| 37 |
|
41 |
|
| 38 |
=cut |
42 |
=cut |
| 39 |
|
43 |
|
|
Lines 43-54
sub get_categories {
Link Here
|
| 43 |
return $self->{_result}->categorycodes( $params ); |
47 |
return $self->{_result}->categorycodes( $params ); |
| 44 |
} |
48 |
} |
| 45 |
|
49 |
|
|
|
50 |
=head3 update_categories |
| 51 |
|
| 52 |
TODO: Ask the author to add a proper description |
| 53 |
|
| 54 |
=cut |
| 55 |
|
| 46 |
sub update_categories { |
56 |
sub update_categories { |
| 47 |
my ( $self, $categories ) = @_; |
57 |
my ( $self, $categories ) = @_; |
| 48 |
$self->_result->delete_related( 'branchrelations' ); |
58 |
$self->_result->delete_related( 'branchrelations' ); |
| 49 |
$self->add_to_categories( $categories ); |
59 |
$self->add_to_categories( $categories ); |
| 50 |
} |
60 |
} |
| 51 |
|
61 |
|
|
|
62 |
=head3 add_to_categories |
| 63 |
|
| 64 |
TODO: Ask the author to add a proper description |
| 65 |
|
| 66 |
=cut |
| 67 |
|
| 52 |
sub add_to_categories { |
68 |
sub add_to_categories { |
| 53 |
my ( $self, $categories ) = @_; |
69 |
my ( $self, $categories ) = @_; |
| 54 |
for my $category ( @$categories ) { |
70 |
for my $category ( @$categories ) { |
|
Lines 56-68
sub add_to_categories {
Link Here
|
| 56 |
} |
72 |
} |
| 57 |
} |
73 |
} |
| 58 |
|
74 |
|
|
|
75 |
=head3 get_effective_marcorgcode |
| 76 |
|
| 77 |
my $marcorgcode = Koha::Libraries->find( $library_id )->get_effective_marcorgcode(); |
| 78 |
|
| 79 |
Returns the effective MARC organization code of the library. It falls back to the value |
| 80 |
from the I<MARCOrgCode> syspref if undefined for the library. |
| 81 |
|
| 82 |
=cut |
| 83 |
|
| 59 |
sub get_effective_marcorgcode { |
84 |
sub get_effective_marcorgcode { |
| 60 |
my ( $self ) = @_; |
85 |
my ( $self ) = @_; |
| 61 |
|
86 |
|
| 62 |
return $self->marcorgcode || C4::Context->preference("MARCOrgCode"); |
87 |
return $self->marcorgcode || C4::Context->preference("MARCOrgCode"); |
| 63 |
} |
88 |
} |
| 64 |
|
89 |
|
| 65 |
=head3 type |
90 |
=head2 Internal methods |
|
|
91 |
|
| 92 |
=head3 _type |
| 66 |
|
93 |
|
| 67 |
=cut |
94 |
=cut |
| 68 |
|
95 |
|
| 69 |
- |
|
|