- $specs{MODEL} //= $class->controller_name;
- $specs{MODEL} =~ s{ ^ SL::DB:: (?: .* :: )? }{}x;
- $specs{FORM_PARAMS} //= 'filter';
- $specs{LAUNDER_TO} = '__INPLACE__' unless exists $specs{LAUNDER_TO};
- $specs{ONLY} //= [];
- $specs{ONLY} = [ $specs{ONLY} ] if !ref $specs{ONLY};
- $specs{ONLY_MAP} = @{ $specs{ONLY} } ? { map { ($_ => 1) } @{ $specs{ONLY} } } : { '__ALL__' => 1 };
+ $specs{MODEL} //= $class->controller_name;
+ $specs{MODEL} =~ s{ ^ SL::DB:: (?: .* :: )? }{}x;
+ $specs{FORM_PARAMS} //= 'filter';
+ $specs{LAUNDER_TO} = '__INPLACE__' unless exists $specs{LAUNDER_TO};
+ $specs{ONLY} //= [];
+ $specs{ONLY} = [ $specs{ONLY} ] if !ref $specs{ONLY};
+ $specs{ONLY_MAP} = @{ $specs{ONLY} } ? { map { ($_ => 1) } @{ $specs{ONLY} } } : { '__ALL__' => 1 };
$class->run_before('_save_current_filter_params', %hook_params);
SL::Controller::Helper::GetModels::register_get_models_handlers(
$class->run_before('_save_current_filter_params', %hook_params);
SL::Controller::Helper::GetModels::register_get_models_handlers(
$calculated_params{query} = [
@{ $calculated_params{query} || [] },
$calculated_params{query} = [
@{ $calculated_params{query} || [] },
- @{ $filter_args{query} || [] },
- @{ $params{query} || [] },
+ @{ $filter_args{ query} || [] },
+ @{ $params{ query} || [] },
];
$calculated_params{with_objects} = [
uniq
@{ $calculated_params{with_objects} || [] },
];
$calculated_params{with_objects} = [
uniq
@{ $calculated_params{with_objects} || [] },
- @{ $filter_args{with_objects} || [] },
- @{ $params{with_objects} || [] },
+ @{ $filter_args{ with_objects} || [] },
+ @{ $params{ with_objects} || [] },
- my %filter_args = ref($spec->{FILTER_ARGS}) eq 'CODE' ? %{ $spec->{FILTER_ARGS}->($self) }
- : $spec->{FILTER_ARGS} ? do { my $sub = $spec->{FILTER_ARGS}; %{ $self->$sub() } }
- : ();
+ my %filter_args = ref($spec->{FILTER_ARGS}) eq 'CODE' ? %{ $spec->{FILTER_ARGS}->($self) }
+ : $spec->{FILTER_ARGS} ? do { my $sub = $spec->{FILTER_ARGS}; %{ $self->$sub() } }
+ : ();
my ($flattened) = SL::Controller::Helper::ParseFilter::flatten($priv->{filter}, undef, $filter_spec->{FORM_PARAMS});
my ($flattened) = SL::Controller::Helper::ParseFilter::flatten($priv->{filter}, undef, $filter_spec->{FORM_PARAMS});