From 6ead305ba4ee9ae5795b3956b41b6a723d7c894d Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 11 Sep 2017 16:08:09 -0300 Subject: [PATCH] Bug 10132: (QA followup) Add POD to ->get_effective_marcorgcode Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart --- Koha/Library.pm | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/Koha/Library.pm b/Koha/Library.pm index 7cfb749955..151f30e56a 100644 --- a/Koha/Library.pm +++ b/Koha/Library.pm @@ -33,7 +33,11 @@ Koha::Library - Koha Library Object class =head1 API -=head2 Class Methods +=head2 Class methods + +=head3 get_categories + +TODO: Ask the author to add a proper description =cut @@ -43,12 +47,24 @@ sub get_categories { return $self->{_result}->categorycodes( $params ); } +=head3 update_categories + +TODO: Ask the author to add a proper description + +=cut + sub update_categories { my ( $self, $categories ) = @_; $self->_result->delete_related( 'branchrelations' ); $self->add_to_categories( $categories ); } +=head3 add_to_categories + +TODO: Ask the author to add a proper description + +=cut + sub add_to_categories { my ( $self, $categories ) = @_; for my $category ( @$categories ) { @@ -56,13 +72,24 @@ sub add_to_categories { } } +=head3 get_effective_marcorgcode + + my $marcorgcode = Koha::Libraries->find( $library_id )->get_effective_marcorgcode(); + +Returns the effective MARC organization code of the library. It falls back to the value +from the I syspref if undefined for the library. + +=cut + sub get_effective_marcorgcode { my ( $self ) = @_; return $self->marcorgcode || C4::Context->preference("MARCOrgCode"); } -=head3 type +=head2 Internal methods + +=head3 _type =cut -- 2.39.5