Using Behaviors

Hi. I want use two different behahvior.

I override find() method in model class. If i use one behavior no problem. But how can i override find() method using multiple behavior.

return new MultilingualQuery(get_called_class()); - MultilingualBehavior

return new ActiveQueryNS(get_called_class()); - NestedSetsBehavior

Create your own query class for the model, use traits and behaviors to add the required functionality and return an instance of this custom query class from find().

i use trait and also use behaviors. i use easyiicms( it’s not multi language. I add the multilingual behavior. But on default easyiicms in components/CategoryModel.php they override find method with

return new ActiveQueryNS(get_called_class()) which is NestedSets behavior.

On documentation of Multilingual behavior says override find method with return new MultilingualQuery(get_called_class()).

If i remove return new ActiveQueryNS(get_called_class()) and add return new MultilingualQuery(get_called_class())

multilingual behavior is ok. But how implement two beahvior on find method ?