How to apply query to model if field not filtered

Posted by jdog on Stack Overflow See other posts from Stack Overflow or by jdog
Published on 2011-01-13T21:00:24Z Indexed on 2011/01/13 22:53 UTC
Read the original article Hit count: 203

Filed under:
|

I have a range of modules running on generator.yml. In some of those I would like to hide records by default of Status: CLOSED (being the last of a range of Statuses). OF course if the user filters for CLOSED i want to show these records.

I thought it would make sense to apply andWhere('status_id=?',Status::CLOSED) in a specific table_method , but how do I access the filters of the module from within the model?

Is there a better way to do this?

© Stack Overflow or respective owner

Related posts about symfony

Related posts about doctrine