Help understanding filters, add_filter(), and how to perform advanced module search.
I'm having a hard time figuring out how to use add_filter() to return an advanced module's model records based on a search term. I looked at some of fuel's builtin modules but i still have some questions.
Let's say i want to search for an "article" that has the word 'test' in either the title or its content.
1) Where should i add these filters so that the returned results of find_all only include the search results? Inside the module itself or can i call the
function from a controller?
2) How should i apply these filters? I tried doing
$this->module_name->add_filters(array('title' => 'test', 'content' => 'test'))
but i still get ALL results in the following find_all()
I guess I need a simple example with a module being loaded and searched with a static term. I will have no problems adding the form handling to that then...