Revision b63ad17e
Von Tamino Steinert vor 9 Monaten hinzugefügt
SL/DB/Helper/Record.pm | ||
---|---|---|
11 | 11 |
use SL::DB::Invoice::TypeData; |
12 | 12 |
use SL::DB::PurchaseInvoice::TypeData; |
13 | 13 |
|
14 |
my @export_subs = qw(get_object_name_from_type get_class_from_type); |
|
14 |
use SL::DB::Helper::TypeDataProxy; |
|
15 |
|
|
16 |
my @export_subs = qw( |
|
17 |
get_object_name_from_type get_class_from_type get_items_class_from_type |
|
18 |
get_type_data_proxy_from_type |
|
19 |
); |
|
15 | 20 |
|
16 | 21 |
our @EXPORT_OK = (@export_subs); |
17 | 22 |
our %EXPORT_TAGS = (subs => \@export_subs); |
... | ... | |
33 | 38 |
return 'SL::DB::' . get_object_name_from_type($type); |
34 | 39 |
} |
35 | 40 |
|
41 |
sub get_items_class_from_type { |
|
42 |
my ($type) = @_; |
|
43 |
return 'SL::DB::' . get_object_name_from_type($type) . 'Item'; |
|
44 |
} |
|
45 |
|
|
46 |
sub get_type_data_proxy_from_type { |
|
47 |
my ($type) = @_; |
|
48 |
return SL::DB::Helper::TypeDataProxy->new( |
|
49 |
get_class_from_type($type), $type |
|
50 |
); |
|
51 |
} |
|
52 |
|
|
36 | 53 |
1; |
37 | 54 |
|
38 | 55 |
__END__ |
Auch abrufbar als: Unified diff
S:D:H:Record: Helferfunktionen für TypeDataProxy und Item-Klassen