Hi, anyone know how to import module.models.* class?
Hi, anyone know how to import module.models.* class?
Yii::import('aplication.modules.MODULENAME.models.*')
if modules directory is out of /protected directory for example:
/protected
/mod/modtest/
them I am using:
Yii::import('webroot.mod.modtest.models.*');
and for generate modules I am using
You can also define new path alias in your app config before returning the array, like the following:
Yii::setPathOfAlias('root', 'another/path');
Then you can use path alias like 'root.path.to.something'
nice, very usefull!
thanks