Hi folks. I need your valuable help. Let’s suppose i have that EER (i made it just for post here cause i cant show the real project).
I would like to do something like $document->availableSearchMethods() and get All of available SearchMethod models. It seems easy and i think it is but i just cant figure out how i could do that cause there is a condition: i just want to get the SearchMethods that have the the same id_type and id_operation like my document.
How could i do that in a Yii way?
I am doing it for use a static method like Document::availableSearchMethods($id_type, $id_operation) that returns me an array of SearchMethod objects.
I just would like to know if there is a way to do that using relations and/or scopes.