In [font="Courier New"]/protected/modules/myforum/MyforumModule.php[/font], how can I import models in [font="Courier New"]/protected/backend/protected/models/*[/font]?
Thanks
In [font="Courier New"]/protected/modules/myforum/MyforumModule.php[/font], how can I import models in [font="Courier New"]/protected/backend/protected/models/*[/font]?
Thanks
In protected/config/main.php, add the following:
Yii::setPathOfAlias('backend', dirname(__FILE__)."/../backend/protected/");
In /protected/modules/myforum/MyforumModule.php, you can now use:
Yii::import('backend.models.*');
Yii::app()->getModule('backend');