@@ -159,6 +159,12 @@ protected function configure()
159
159
InputOption::VALUE_OPTIONAL ,
160
160
$ this ->trans ('commands.generate.theme.options.base-theme ' )
161
161
)
162
+ ->addOption (
163
+ 'base-theme-regions ' ,
164
+ null ,
165
+ InputOption::VALUE_NONE ,
166
+ $ this ->trans ('commands.generate.theme.options.base-theme-regions ' )
167
+ )
162
168
->addOption (
163
169
'regions ' ,
164
170
null ,
@@ -204,6 +210,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
204
210
$ core = $ input ->getOption ('core ' );
205
211
$ package = $ input ->getOption ('package ' );
206
212
$ base_theme = $ input ->getOption ('base-theme ' );
213
+ $ base_theme_regions = $ input ->getOption ('base-theme-regions ' );
207
214
$ global_library = $ input ->getOption ('global-library ' );
208
215
$ libraries = $ input ->getOption ('libraries ' );
209
216
$ regions = $ input ->getOption ('regions ' );
@@ -217,6 +224,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
217
224
$ breakpoints = $ this ->explodeInlineArray ($ breakpoints );
218
225
}
219
226
227
+ $ base_theme_path = $ this ->extensionManager ->getTheme ($ base_theme );
228
+
220
229
$ this ->generator ->generate ([
221
230
'theme ' => $ theme ,
222
231
'machine_name ' => $ machine_name ,
@@ -225,6 +234,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
225
234
'description ' => $ description ,
226
235
'package ' => $ package ,
227
236
'base_theme ' => $ base_theme ,
237
+ 'base_theme_path ' => is_null ($ base_theme_path ) ? false : $ base_theme_path ->getRealPath (),
238
+ 'base_theme_regions ' => $ base_theme_regions ,
228
239
'global_library ' => $ global_library ,
229
240
'libraries ' => $ libraries ,
230
241
'regions ' => $ regions ,
@@ -249,12 +260,11 @@ protected function interact(InputInterface $input, OutputInterface $output)
249
260
}
250
261
251
262
if (!$ theme ) {
252
- $ validators = $ this ->validator ;
253
263
$ theme = $ this ->getIo ()->ask (
254
264
$ this ->trans ('commands.generate.theme.questions.theme ' ),
255
265
'' ,
256
- function ($ theme ) use ( $ validators ) {
257
- return $ validators ->validateModuleName ($ theme );
266
+ function ($ theme ) {
267
+ return $ this -> validator ->validateModuleName ($ theme );
258
268
}
259
269
);
260
270
$ input ->setOption ('theme ' , $ theme );
@@ -272,8 +282,8 @@ function ($theme) use ($validators) {
272
282
$ machine_name = $ this ->getIo ()->ask (
273
283
$ this ->trans ('commands.generate.theme.questions.machine-name ' ),
274
284
$ this ->stringConverter ->createMachineName ($ theme ),
275
- function ($ machine_name ) use ( $ validators ) {
276
- return $ validators ->validateMachineName ($ machine_name );
285
+ function ($ machine_name ) {
286
+ return $ this -> validator ->validateMachineName ($ machine_name );
277
287
}
278
288
);
279
289
$ input ->setOption ('machine-name ' , $ machine_name );
0 commit comments