This repository was archived by the owner on Sep 19, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
sitedyno edited this page Dec 2, 2010
·
2 revisions
This plugin will make searching paginated lists in your CakePHP application easy. The plugin contains a component to build filtering queries and a helper that aids in generating forms.
The component attempts to be as auto magic as possible. By default the component will take all data submitted by post and redirect to the same action with a url that contains all fields and data from the form. The component then takes the data from the URL, builds a query, assigns that query to Controller::$paginate, and then repopulates the data into Controller::$data so the query can be modified for the next search iteration. In this way all searches can be bookmarked and may aid in SEO.
-
Filters on HasMany and HABTM relations
Uses the method described here to filter on HasMany and HABTM relations.
-
Optional redirects
Redirects search to a URL that can be bookmarked. This feature can be turned off.
-
Flexible Sanitation Options
Sanitation has settings for post and redirection (they are treated differently). You can also pass options directly to Sanitize::clean() through the component. The sanitize and urlencode options can also be disabled.
-
Formatted Fields
If you want to pass some value through the URL that would normally get clobbered by Sanitize::clean(). You can set a pattern (using regexp) to determine which parts of the value get sanitized.
-
Virtual Fields
The plugin supports several “virtual Fields”. These fields are handled separately and allow for things like date ranges etc. The helper will also generate form widgets for each supported type. Currently supported virtual fields:- datetime range
- date range
- timestamp range
- time range
- range
- before
- after
- all
-
Spaces are Wildcards
Spaces are converted to wildcards, making searches more forgiving. This option can be disabled.
-
Unit Tests
The component has ~60 unit tests. Tests for the helper are on the todo list.