E
E
evilelf2015-03-31 17:45:07
Yii
evilelf, 2015-03-31 17:45:07

How to change or add a condition to a CActiveDataProvider that has already been passed a CDbCriteria?

Hello!
There was a need to change the CActiveDataProvider to which CDbCriteria has already been passed.
How to do it?
Example: the searh method in the model, I want to change it on the fly.
ps has so far implemented it by passing the condition parameter to search and checking for its presence. But the soul desires a different solution.
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
evilelf, 2015-09-05
@evilelf

so far I've implemented it by passing the condition parameter to search and checking for its presence. But the soul desires a different solution.

A
Alexander Makarov, 2015-03-31
@SamDark

Passing a parameter to a method is fine.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question