https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19234

--- Comment #13 from Tomás Cohen Arazi <[email protected]> ---
(In reply to Martin Renvoize from comment #8)
> This somehow feels like a step too far in trying to generalise a mapping
> between api query parameters and database fields.. perhaps I'm wrong though
> and we're aiming to try to keep that link strongly bound.. perhaps some
> examples of how you're expecting to use this outside of just the pagination
> merging.

This helper is only intended to extract reserved params from the query (so a
single point for having this written, and testing it, thus becoming a standard
on the codebase too). It is up to the controller methods to pass the resulting
$filter as-is or chew it a bit more. But I agree the naming of the method, and
the sample usage is misleading.

> On the pagination side.. I think I'd probably add that slice of code to
> ::Plugin::Pagination (to keep it with the pagination stuff) and name it
> something along the lines of 'dbic_merge_pagination_attributes'?

Adding to my response above, I think this should just extract the reserved
params, and return the two hashrefs it returns now, without mentioning
attributes and filters. And yes, building the DBIC 'pagination filter' should
be left to the Pagination helper.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to