amc
(Beemer3d)
1
I have a parameterised named scope which I use to provide searching on a datamodel e.g.
$data = MyModel:model()->searchFor($q)->findAll(..);
Is there a way to specify parameterised named scopes when using a CActiveDataProvider?
Thanks
amc
nagash
(L Nagash)
2
amc
(Beemer3d)
3
Thanks Nagash
This extension seems to support normal scopes but not parameterised scopes.
amc
fr0d0z
(Yiiframework)
4
I know this is a couple of years past when you asked the question, but for people looking at this thread in the future, check out this thread: http://www.yiiframework.com/forum/index.php/topic/23358-parameterized-vs-named-scopes-question-using-yii-118/
I ended up figuring it out. Yii 1.1.7 allows you to call a scoping function with parameters. Quite cool.
gerhard
(gerhard@ecolar.co.za)
5
Here is an example of using a parameterized named scope in both the find() functions and in dataprovider generation:
Parameterized named scope