Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- В конфиге:
- 'modules' => [
- 'MyModul' => [
- 'class' => 'common\modules\MyModul\module',
- 'test' => 'трололо',
- ],
- ....
- ],
- В миграции
- $userModul = new common\modules\MyModul\module('MyModul');
- var_dump($userModul->test);
- В модуле
- class module extends \yii\base\Module
- {
- public $test = null;
- /**
- * @inheritdoc
- */
- public $controllerNamespace = 'common\modules\UserFriends\controllers';
- /**
- * @inheritdoc
- */
- public function init()
- {
- parent::init();
- // custom initialization code goes here
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement