I have created some model and some parameterized named scopes in it. And now i want to add some filtering options to data, displaying by CGridView, collected by CActiveDataProvider. I certainly can write something like this:
$dataProvider=new CActiveDataProvider('MyModel', array( 'criteria'=>array( 'condition'=>'param=:param', 'params'=>array( ':param'=>$param, ...
but i don’t want to duplicate already written conditions, defined in scopes. Now i use this:
but maybe there is a better way to do this?