za_al
(Zakieh Alizadeh)
#1
Hi All
suppose i am using two modules in my project.
for example :
1-"Auth" module for manage access control that need following config(set special class of module for class value) :
'components' => array(
.........
'user' => array(
'class' => 'application.modules.user.components.AuthWebUser',
'allowAutoLogin' => true,
),
2-"user" module for user manage that need following config (set special class of module for class value) :
'components' => array(
.........
'user' => array(
'class' => 'application.modules.Auth.components.YumWebUser',
'allowAutoLogin' => true,
),
witch value should set for class in main config.php in project?
...
'class' => 'application.modules.Auth.components.YumWebUser',
...
or
..
'class' => 'application.modules.user.components.AuthWebUser',
...
Ankit_Modi
(Ankit Modi)
#2
Hi if you want to create a two module so basically create the two class and call them separately what you are using module.
see ex…
'admin' => array(
'allowAutoLogin' => true,
'autoUpdateFlash' => true,
'class' => 'AdminRWebUser',
'loginUrl' => array('/admin/login'),
'fullname' => '',
),
'customer' => array(
'allowAutoLogin' => true,
'autoUpdateFlash' => true,
'class' => 'CustomerRWebUser',
'loginUrl' => array('/customer/index'),
),
In ex when I call a admin module AdminRWebUser class call similar customer module call a CustomerRWebUser class call.
I hope it’s some help.
za_al
(Zakieh Alizadeh)
#3
Hi
Tanks for your Reply.
I found this solution :
Each macule has init() in modules/modulename/…modules class that initial module and I set some config in this function in each module separately:
public function init() {
Yii::app()->configure(array(
'theme' => 'blackOrange',
'language' => 'fa',
'components' => array(
'coreMessages' => array(
'basePath' => $this->basePath . '\messages',
),
'messages' => array(
'class' => 'CPhpMessageSource',
'basePath' => $this->basePath . '\messages',
),
),
));