Skip to content
Permalink
Browse files

3860 region options (#3959)

* Add new arguments key and target. Make it possible use not only default target for db connections

* Fix region options
  • Loading branch information...
LOBsTerr committed Apr 6, 2019
1 parent 09114aa commit e95210756fe9dc22f6b8240fedc58c8cd1accf98
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/Command/Generate/PluginBlockCommand.php
@@ -224,9 +224,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
protected function interact(InputInterface $input, OutputInterface $output)
{
$theme = $this->configFactory->get('system.theme')->get('default');
$themeRegions = \system_region_list($theme, REGIONS_VISIBLE);
// --module option
$this->getModuleOption();
@@ -265,10 +262,17 @@ function ($class) {
// --theme-region option
$themeRegion = $input->getOption('theme-region');
if (!$themeRegion) {
$theme = $this->configFactory->get('system.theme')->get('default');
$themeRegions = \system_region_list($theme, REGIONS_VISIBLE);
$themeRegionOptions = [];
foreach ($themeRegions as $key => $region) {
$themeRegionOptions[$key] = $region->render();
}
$themeRegion = $this->getIo()->choiceNoList(
$this->trans('commands.generate.plugin.block.questions.theme-region'),
array_values($themeRegions),
$themeRegionOptions,
'',
true
);

0 comments on commit e952107

Please sign in to comment.
You can’t perform that action at this time.