Revision 260c52c3
Von Moritz Bunkus vor fast 12 Jahren hinzugefügt
SL/DB/Helper/LinkedRecords.pm | ||
---|---|---|
19 | 19 |
dir => delete($params{sort_dir}) ); |
20 | 20 |
my $filter = delete $params{filter}; |
21 | 21 |
|
22 |
my $records = linked_records_implementation($self, %params); |
|
22 |
my $records = _linked_records_implementation($self, %params);
|
|
23 | 23 |
$records = filter_linked_records($self, $filter, @{ $records }) if $filter; |
24 | 24 |
$records = sort_linked_records($self, $sort_spec{by}, $sort_spec{dir}, @{ $records }) if $sort_spec{by}; |
25 | 25 |
|
26 | 26 |
return $records; |
27 | 27 |
} |
28 | 28 |
|
29 |
sub linked_records_implementation { |
|
29 |
sub _linked_records_implementation {
|
|
30 | 30 |
my $self = shift; |
31 | 31 |
my %params = @_; |
32 | 32 |
|
... | ... | |
37 | 37 |
my %from_to = ( from => delete($params{from}) || $both, |
38 | 38 |
to => delete($params{to}) || $both); |
39 | 39 |
|
40 |
my @records = (@{ linked_records_implementation($self, %params, direction => 'from', from => $from_to{from}) }, |
|
41 |
@{ linked_records_implementation($self, %params, direction => 'to', to => $from_to{to} ) }); |
|
40 |
my @records = (@{ _linked_records_implementation($self, %params, direction => 'from', from => $from_to{from}) },
|
|
41 |
@{ _linked_records_implementation($self, %params, direction => 'to', to => $from_to{to} ) });
|
|
42 | 42 |
|
43 | 43 |
my %record_map = map { ( ref($_) . $_->id => $_ ) } @records; |
44 | 44 |
|
Auch abrufbar als: Unified diff
LinkedRecords-Helfer: Funktionsname privat gemacht