I have some useful methods in the base controller (in component folder) and I want to make it available for other areas to use. For example, I want it to be available to CFormModel, UserIdentity and other classes to use. I have searched the forum but cannot find anything yet. Please help.
You can use "Yii::app()->controller" to access the current controller instance.
But I think it’s not a good idea to call some methods in the controller from a model.
What kind of methods do you want to reuse?
Do they have to be in the controller?
If the methods are kind of small utility functions, I think it’s better to create an application component class to store them and call them from your controller, models and others.