So here is the deal.
I have a system where visibilty to certains things is prohibited by business logic. so something that one user can see might not neccesarily be visible to another user and vice verca.
I have a Method built onto the model that defines this called isVisible. This simply returns a true false.
So my finds can be something like this.
Things::find()->filter(function($thing){
return ($thing->isVisible()) ? $thing : false});
This method works great. BUT it would be easier if could directly affect the find method to do this automatically. so that i wouldn't have to add taht filter anywhere that i am getting "Things" etc.
I have been looking through documents and haven't found what i am looking for so far.
AfterFetch doesn't appear to offer the option to remove an item from a resultset.
How can I decorate the default find method?
Any ideas?