@@ -100,7 +100,7 @@ |
||
100 | 100 | // see if the module has a registerComponents method |
101 | 101 | foreach ($module->registerComponents() as $componentId => $definition) { |
102 | 102 | if (!$app->has($componentId)) { |
103 | - Yii::trace('Register component ' . $componentId, __METHOD__); |
|
103 | + Yii::trace('Register component '.$componentId, __METHOD__); |
|
104 | 104 | $app->set($componentId, $definition); |
105 | 105 | } |
106 | 106 | } |
@@ -99,22 +99,22 @@ discard block |
||
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
102 | - $appModulesFolder = Yii::$app->basePath . DIRECTORY_SEPARATOR . 'modules'; |
|
103 | - $moduleFolder = $appModulesFolder . DIRECTORY_SEPARATOR . $moduleName; |
|
102 | + $appModulesFolder = Yii::$app->basePath.DIRECTORY_SEPARATOR.'modules'; |
|
103 | + $moduleFolder = $appModulesFolder.DIRECTORY_SEPARATOR.$moduleName; |
|
104 | 104 | |
105 | 105 | if (file_exists($moduleFolder)) { |
106 | - return $this->outputError("The folder " . $moduleFolder . " exists already."); |
|
106 | + return $this->outputError("The folder ".$moduleFolder." exists already."); |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | $folders = [ |
110 | 110 | 'basePath' => $moduleFolder, |
111 | - 'adminPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'admin', |
|
112 | - 'adminPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'aws', |
|
113 | - 'frontendPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend', |
|
114 | - 'blocksPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . 'blocks', |
|
115 | - 'blocksPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . 'controllers', |
|
116 | - 'blocksPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'frontend' . DIRECTORY_SEPARATOR . 'views', |
|
117 | - 'modelsPath' => $moduleFolder . DIRECTORY_SEPARATOR . 'models', |
|
111 | + 'adminPath' => $moduleFolder.DIRECTORY_SEPARATOR.'admin', |
|
112 | + 'adminPath' => $moduleFolder.DIRECTORY_SEPARATOR.'admin'.DIRECTORY_SEPARATOR.'aws', |
|
113 | + 'frontendPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend', |
|
114 | + 'blocksPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend'.DIRECTORY_SEPARATOR.'blocks', |
|
115 | + 'blocksPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend'.DIRECTORY_SEPARATOR.'controllers', |
|
116 | + 'blocksPath' => $moduleFolder.DIRECTORY_SEPARATOR.'frontend'.DIRECTORY_SEPARATOR.'views', |
|
117 | + 'modelsPath' => $moduleFolder.DIRECTORY_SEPARATOR.'models', |
|
118 | 118 | ]; |
119 | 119 | |
120 | 120 | $ns = 'app\\modules\\'.$moduleName; |
@@ -124,9 +124,9 @@ discard block |
||
124 | 124 | } |
125 | 125 | |
126 | 126 | $contents = [ |
127 | - $moduleFolder. DIRECTORY_SEPARATOR . 'README.md' => $this->renderReadme($folders, $name, $ns), |
|
128 | - $moduleFolder. DIRECTORY_SEPARATOR . 'admin/Module.php' => $this->renderAdmin($folders, $name, $ns), |
|
129 | - $moduleFolder. DIRECTORY_SEPARATOR . 'frontend/Module.php' => $this->renderFrontend($folders, $name, $ns), |
|
127 | + $moduleFolder.DIRECTORY_SEPARATOR.'README.md' => $this->renderReadme($folders, $name, $ns), |
|
128 | + $moduleFolder.DIRECTORY_SEPARATOR.'admin/Module.php' => $this->renderAdmin($folders, $name, $ns), |
|
129 | + $moduleFolder.DIRECTORY_SEPARATOR.'frontend/Module.php' => $this->renderFrontend($folders, $name, $ns), |
|
130 | 130 | ]; |
131 | 131 | |
132 | 132 | foreach ($contents as $fileName => $content) { |
@@ -55,11 +55,11 @@ |
||
55 | 55 | |
56 | 56 | $module = Yii::$app->getModule($moduleId); |
57 | 57 | |
58 | - $folder = $module->basePath . DIRECTORY_SEPARATOR . 'aws'; |
|
58 | + $folder = $module->basePath.DIRECTORY_SEPARATOR.'aws'; |
|
59 | 59 | |
60 | - $file = $folder . DIRECTORY_SEPARATOR . $className . '.php'; |
|
60 | + $file = $folder.DIRECTORY_SEPARATOR.$className.'.php'; |
|
61 | 61 | |
62 | - $content = $this->renderWindowClassView($className, $module->getNamespace() . '\\aws', $moduleId); |
|
62 | + $content = $this->renderWindowClassView($className, $module->getNamespace().'\\aws', $moduleId); |
|
63 | 63 | |
64 | 64 | FileHelper::createDirectory($folder); |
65 | 65 |