Kohana 3 Filter Class $_POST / $_GET

Description of the producer

Here's a class that has come in super handy for me lately. I created it for use with Kohana v3. Basically, say you have an adminstrator backend to your website and you so you have a page for blog posts and one for blog categories. Simple enough. But you wanna give your users options to filter their results so they don't have to search through hundreds or thousands of blog posts every time they wanna find a certain post. Easy enough.

But then you have the problem where the user filters the results, finds the post they want, goes to edit it, then it sends them back to the list of all posts. But whoops, they forgot they wanted to change something else in that same post. Now they have to re-filter all over again and find it. VERY ANNOYING!

So with this class you can provide it with an array of keys to keep track of over multiple page loads. It keeps every controller and actions filters seperate so that you can easily use them throughout your controllers and views. So if you want to filter by 'Author' and 'Category' then the class will look for the keys 'author' and 'category' in either $_POST or $_GET and add them to the filters. Now when the user returns to that page, all filters will still be applied. It's a big time saver!


theairfilter said...

Thanks for such informative blog, it really prove worthwhile in my air cleaner filter business. I hope you like it.

rgfairpurification said...

Our one of the Indoor Air Quality business. It affected by microbial contaminants , gases or energy stressor that can induce adverse health conditions. Indoor air is becoming an increasingly more concerning health hazard than outdoor air. I hope you like it.

Toorgy said...

We have a wide range of experience in all aspects of residential Plumbing improvement work. It provide the full range of handyman services like Replacing taps, sinks, baths and toilets etc. Our Plumber London business is one of them, i hope you like it.

Options Trading said...

Thanks for sharing, it really helpful for my Options Trading business. It is the solution for quick service at affordable rates, and the best Options Trading in two markets with high coloration.

Hvacservice said...

I agree with whatever you have said in your blog..thanks for sharing this valuable information.it will help me in my business. HVAC Baltimore

johnson smith said...

It affected by microbial contaminants , gases or energy stressor that can induce adverse health conditions.
AC Service Frisco

Post a Comment