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

(-)a/Koha/Item/Bundle.pm (+63 lines)
Line 0 Link Here
1
package Koha::Item::Bundle;
2
3
# Copyright Koha Development Team 2023
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# Koha is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20
use Modern::Perl;
21
use Koha::Item;
22
23
use base qw(Koha::Object);
24
25
=head1 NAME
26
27
Koha::Item::Bundle - Koha item bundle object
28
29
=head1 METHODS
30
31
=head2 item_object
32
33
    $item_bundle->item_object;
34
35
=cut
36
37
sub item_object { # name chosen different from column 'item'
38
    my ( $self ) = @_;
39
    return Koha::Item->_new_from_dbic( $self->_result->item );
40
}
41
42
=head2 host_item
43
44
    $item_bundle->host_item.barcode;
45
46
=cut
47
48
sub host_item {
49
    my ( $self ) = @_;
50
    return Koha::Item->_new_from_dbic( $self->_result->host );
51
}
52
53
=head1 INTERNAL METHODS
54
55
=head2 _type
56
57
=cut
58
59
sub _type {
60
    return 'ItemBundle';
61
}
62
63
1;
(-)a/Koha/Item/Bundles.pm (-1 / +50 lines)
Line 0 Link Here
0
- 
1
package Koha::Item::Bundles;
2
3
# Copyright Koha Development Team 2023
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# Koha is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20
use Modern::Perl;
21
22
use Koha::Item::Bundle;
23
24
use base qw(Koha::Objects);
25
26
=head1 NAME
27
28
Koha::Item::Bundles - Koha item bundles object
29
30
=head1 INTERNAL METHODS
31
32
=cut
33
34
=head2 _type
35
36
=cut
37
38
sub _type {
39
    return 'ItemBundle';
40
}
41
42
=head3 object_class
43
44
=cut
45
46
sub object_class {
47
    return 'Koha::Item::Bundle';
48
}
49
50
1;

Return to bug 29099