|
Lines 36-78
Koha::Library - Koha Library Object class
Link Here
|
| 36 |
|
36 |
|
| 37 |
=head2 Class methods |
37 |
=head2 Class methods |
| 38 |
|
38 |
|
| 39 |
=head3 get_categories |
|
|
| 40 |
|
| 41 |
TODO: Ask the author to add a proper description |
| 42 |
|
| 43 |
=cut |
| 44 |
|
| 45 |
sub get_categories { |
| 46 |
my ( $self, $params ) = @_; |
| 47 |
# TODO This should return Koha::LibraryCategories |
| 48 |
return $self->{_result}->categorycodes( $params ); |
| 49 |
} |
| 50 |
|
| 51 |
=head3 update_categories |
| 52 |
|
| 53 |
TODO: Ask the author to add a proper description |
| 54 |
|
| 55 |
=cut |
| 56 |
|
| 57 |
sub update_categories { |
| 58 |
my ( $self, $categories ) = @_; |
| 59 |
$self->_result->delete_related( 'branchrelations' ); |
| 60 |
$self->add_to_categories( $categories ); |
| 61 |
} |
| 62 |
|
| 63 |
=head3 add_to_categories |
| 64 |
|
| 65 |
TODO: Ask the author to add a proper description |
| 66 |
|
| 67 |
=cut |
| 68 |
|
| 69 |
sub add_to_categories { |
| 70 |
my ( $self, $categories ) = @_; |
| 71 |
for my $category ( @$categories ) { |
| 72 |
$self->_result->add_to_categorycodes( $category->_result ); |
| 73 |
} |
| 74 |
} |
| 75 |
|
| 76 |
=head3 stockrotationstages |
39 |
=head3 stockrotationstages |
| 77 |
|
40 |
|
| 78 |
my $stages = Koha::Library->stockrotationstages; |
41 |
my $stages = Koha::Library->stockrotationstages; |
| 79 |
- |
|
|