There is a module in my Yii based aplication which resides in default modules path (protected/application/modules). I need to move this module to common path for multiple projects (/var/www/yiimodules) while rest of modules remain in default modules path.
There are many references to this module in application. For example:
application.modules.ContentManagement.views.layout.default (in base controller)
application.modules.ContentManagement.controllers.* (in config)
…
I need to change load path from protected/application/modules/ContentManagement to /var/www/yiimodules/ContentManagement while retaining application.modules.ContentManagement references.
I don’t know if that’s possible but why not refactoring it all and updating those references to the module files?
What you could do is to put several rows into main.php ‘import’ attribute of the webapp configuration like [size=“2”][color="#1C2837"]‘application.yiimodules.ContentManagement.controllers.*’ and then in the application itself refer to the referred files directly without the need to fully qualify them. That will require a single search-and-replace throughout the app that is relatively simple (and if you’re careful not to forget anything also relatively safe regarding bugs).[/color][/size]