Is there any open source code (or example) for Symfony2 that can filter a specific model using several parameters? A good example of what I'm looking for can be seen on this Trulia webpage.
http://www.trulia.com/for_sale/30000-1000000_price/10001_zip/
http://www.trulia.com/for_rent/Chicago,IL/#for_rent/Chicago,IL/0-500_price/wd,dw_amenities/sm_dogs_pets"
http://www.trulia.com/for_rent/Chicago,IL/#for_rent/Chicago,IL/400-500_price/wd,dw_amenities
http://www.trulia.com/for_rent/Chicago,IL/#for_rent/Chicago,IL/wd,dw_amenities"
http://www.trulia.com/for_rent/Chicago,IL/#for_rent/Chicago,IL/400p_price/dw,cs_amenities
http://www.trulia.com/for_rent/Chicago,IL/#for_rent/Chicago,IL/1p_beds/1p_baths/400p_price/dw,cs_amenities
Notice how the URLs are generated when clicked on the form, I think it uses one controller for all these routes. How it's done? I don’t think that it redirects all possible routes to a specific controller (see below), maybe some kind of dynamic routing?
public function filterAction($state, $beds, $bath, $min_price, $max_price ....)
{
....
}
Thank.