Yii search functionality

i have ModelA it has a search function…

I created ControllerB that has ModelB …but ControllerB needs ModelA and its search functionality…

ModelA has 3 different search functions…

if I will create searchB() function, and place it at the ModelA rules as ‘columns’,‘safe’,‘on’=>‘searchB’

will it actually bring out the results that i want in searchB ?..or it will still bring out the result from the other functions let’s say i do this in the index of my ControllerB

$model = new ModelA(‘searchB’);

It simply depends on which ‘search’ method of what model you call.

If you call ModelA::search from ControllerA or ControllerB, then ModelA::search will be executed.

And if you call ModelA::searchB from ControllerA or ControllerB, then ModelA::searchB will be executed.

Scenario doesn’t affect which method to call.

thanks for this clarification…this thing got me stuck for days :lol: