+#my $registered_handlers = {};
+
+sub init {
+ my ($self, %params) = @_;
+
+# for my $plugin (qw(filtered sorted paginated)) {
+# next unless $params{$plugin};
+# $self->${ \"make_$plugin" }(%{ delete $params{$plugin} || {} });
+# }
+#
+ # TODO: default model
+ $self->model(delete $params{model});
+
+ for my $plugin (qw(filtered sorted paginated)) {
+ next unless my $spec = delete $params{$plugin} // {};
+ my $plugin_class = "SL::Controller::Helper::GetModels::" . ucfirst $plugin;
+ $self->$plugin($plugin_class->new(%$spec, get_models => $self));
+ }