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

(-)a/Koha/Item.pm (-14 / +2 lines)
Lines 42-48 Koha::Item - Koha Item object class Link Here
42
42
43
=head1 API
43
=head1 API
44
44
45
=head2 Class Methods
45
=head2 Class methods
46
46
47
=cut
47
=cut
48
48
Lines 315-333 sub add_to_rota { Link Here
315
    return $self;
315
    return $self;
316
}
316
}
317
317
318
=head3 biblio
318
=head2 Internal methods
319
320
  my $biblio = $item->biblio;
321
322
Returns the biblio associated with the current item.
323
324
=cut
325
326
sub biblio {
327
    my ( $self ) = @_;
328
    my $rs = $self->_result->biblio;
329
    return Koha::Biblio->_new_from_dbic( $rs );
330
}
331
319
332
=head3 _type
320
=head3 _type
333
321
(-)a/Koha/Library.pm (-38 lines)
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
- 

Return to bug 11897