Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. В конфиге:
  2. 'modules' => [
  3. 'MyModul' => [
  4. 'class' => 'common\modules\MyModul\module',
  5. 'test' => 'трололо',
  6. ],
  7. ....
  8. ],
  9. В миграции
  10. $userModul = new common\modules\MyModul\module('MyModul');
  11. var_dump($userModul->test);
  12. В модуле
  13. class module extends \yii\base\Module
  14. {
  15. public $test = null;
  16. /**
  17. * @inheritdoc
  18. */
  19. public $controllerNamespace = 'common\modules\UserFriends\controllers';
  20.  
  21. /**
  22. * @inheritdoc
  23. */
  24. public function init()
  25. {
  26. parent::init();
  27.  
  28. // custom initialization code goes here
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement