Revision a9406a2d
Von Moritz Bunkus vor mehr als 9 Jahren hinzugefügt
SL/Controller/Helper/GetModels/Filtered.pm | ||
---|---|---|
9 | 9 |
|
10 | 10 |
use Rose::Object::MakeMethods::Generic ( |
11 | 11 |
scalar => [ qw(filter_args filter_params orig_filter filter) ], |
12 |
'scalar --get_set_init' => [ qw(form_params launder_to) ], |
|
12 |
'scalar --get_set_init' => [ qw(form_params launder_to laundered) ],
|
|
13 | 13 |
); |
14 | 14 |
|
15 | 15 |
sub init { |
... | ... | |
60 | 60 |
} |
61 | 61 |
} |
62 | 62 |
|
63 |
# Store laundered result in $self->laundered. |
|
64 |
$self->laundered($laundered // $filter) unless $parse_filter_args{no_launder}; |
|
65 |
|
|
63 | 66 |
# $::lxdebug->dump(0, "get_current_filter_params: ", \%calculated_params); |
64 | 67 |
|
65 | 68 |
$self->filter_params(\%calculated_params); |
... | ... | |
111 | 114 |
'filter' |
112 | 115 |
} |
113 | 116 |
|
117 |
sub init_laundered { |
|
118 |
my ($self) = @_; |
|
119 |
|
|
120 |
$self->get_models->finalize; |
|
121 |
return $self->{laundered}; |
|
122 |
} |
|
114 | 123 |
|
115 | 124 |
1; |
116 | 125 |
|
... | ... | |
185 | 194 |
C<Filtered> will honor custom filters defined in RDBO managers. See |
186 | 195 |
L<SL::DB::Helper::Filtered> for an explanation fo those. |
187 | 196 |
|
197 |
=head1 FUNCTIONS |
|
198 |
|
|
199 |
=over 4 |
|
200 |
|
|
201 |
=item C<laundered> |
|
202 |
|
|
203 |
Finalizes the object (which causes laundering of the filter structure) |
|
204 |
and returns a hashref of the laundered filter. If the plugin is |
|
205 |
configured not to launder then C<undef> will be returned. |
|
206 |
|
|
207 |
=back |
|
208 |
|
|
188 | 209 |
=head1 BUGS |
189 | 210 |
|
190 | 211 |
=over 4 |
Auch abrufbar als: Unified diff
GetModels Filtered: gelaunderten Filter im Plugin zur Verfügung stellen