Reputation: 1732
In every module i have config(with params and etc.). Registration
\Yii::configure($this, require __DIR__ . '/config/config.php');
How I get params from another module? For example: in user module i need params from product module.
Upvotes: 0
Views: 1845
Reputation: 133380
You could get the module ref eg using the related id (eg: user)
$moduleUser = \Yii::$app->getModule('user');
then you can access to the related param (eg: myParam)
$myParam = $moduleUser->params['myParam'];
Upvotes: 1