,
Yii::app()->getModule('user')->encrypting($this->password)
Yii::app()->controller->module->encrypting($this->password)
, "" , , . .
, , . UserModule.php
public static function id() {
return 'user';
}
, ,
Yii::app()->getModule(UserModule::id())->encrypting($this->password)
, , :
'application.modules.user.models.*',
'application.modules.user.components.*',
UserModule.php:
public function init()
{
$this->setImport(array(
'user.models.*',
'user.components.*',
));
}
, , - , , . , LoginForm, NOT , :
$model = new UserLogin;
UserLogin , , , , :
$module = Yii::app()->getModule(UserModule::id());
$model = new UserLogin;
, , , .
http://www.yiiframework.com/forum/index.php?/topic/6449-access-another-modules-model/ , =)