Revision 6c59b08a
Von Bernd Bleßmann vor etwa 7 Jahren hinzugefügt
SL/DB/Inventory.pm | ||
---|---|---|
6 | 6 |
use strict; |
7 | 7 |
|
8 | 8 |
use SL::DB::MetaSetup::Inventory; |
9 |
use SL::DB::Manager::Inventory; |
|
9 | 10 |
|
10 | 11 |
__PACKAGE__->meta->initialize; |
11 | 12 |
|
12 |
# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. |
|
13 |
__PACKAGE__->meta->make_manager_class; |
|
14 |
|
|
15 | 13 |
# part accessor is badly named |
16 | 14 |
sub part { |
17 | 15 |
goto &parts; |
SL/DB/Manager/Inventory.pm | ||
---|---|---|
1 |
package SL::DB::Manager::Inventory; |
|
2 |
|
|
3 |
use strict; |
|
4 |
|
|
5 |
use SL::DB::Helper::Manager; |
|
6 |
use base qw(SL::DB::Helper::Manager); |
|
7 |
|
|
8 |
use SL::DB::Helper::Filtered; |
|
9 |
use SL::DB::Helper::Paginated; |
|
10 |
use SL::DB::Helper::Sorted; |
|
11 |
|
|
12 |
sub object_class { 'SL::DB::Inventory' } |
|
13 |
|
|
14 |
__PACKAGE__->make_manager_methods; |
|
15 |
|
|
16 |
sub _sort_spec { |
|
17 |
return ( |
|
18 |
default => [ 'itime', 1 ], |
|
19 |
columns => { |
|
20 |
SIMPLE => 'ALL', |
|
21 |
}); |
|
22 |
} |
|
23 |
|
|
24 |
sub default_objects_per_page { |
|
25 |
20; |
|
26 |
} |
|
27 |
|
|
28 |
1; |
Auch abrufbar als: Unified diff
Inventur: Manager-Klasse für Inventory (f. sorting/paginating)