Skip to content

Commit

Permalink
[plugin:block] Change the option label to plugin-label (#3851)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjuarez20 authored and enzolutions committed May 14, 2019
1 parent c2c3efb commit 02726f5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/Command/Generate/PluginBlockCommand.php
Expand Up @@ -125,10 +125,10 @@ protected function configure()
$this->trans('commands.generate.plugin.block.options.class')
)
->addOption(
'label',
'plugin-label',
null,
InputOption::VALUE_OPTIONAL,
$this->trans('commands.generate.plugin.block.options.label')
$this->trans('commands.generate.plugin.block.options.plugin-label')
)
->addOption(
'plugin-id',
Expand Down Expand Up @@ -169,7 +169,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$module = $this->validateModule($input->getOption('module'));
$class_name = $this->validator->validateClassName($input->getOption('class'));
$label = $input->getOption('label');
$plugin_label = $input->getOption('plugin-label');
$plugin_id = $input->getOption('plugin-id');
$services = $input->getOption('services');
$theme_region = $input->getOption('theme-region');
Expand Down Expand Up @@ -200,7 +200,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->generator->generate([
'module' => $module,
'class_name' => $class_name,
'label' => $label,
'label' => $plugin_label,
'plugin_id' => $plugin_id,
'services' => $build_services,
'inputs' => $inputs,
Expand Down Expand Up @@ -240,14 +240,14 @@ function ($class) {
$input->setOption('class', $class);
}

// --label option
$label = $input->getOption('label');
if (!$label) {
$label = $this->getIo()->ask(
$this->trans('commands.generate.plugin.block.questions.label'),
// --plugin-label option
$plugin_label = $input->getOption('plugin-label');
if (!$plugin_label) {
$plugin_label = $this->getIo()->ask(
$this->trans('commands.generate.plugin.block.questions.plugin-label'),
$this->stringConverter->camelCaseToHuman($class)
);
$input->setOption('label', $label);
$input->setOption('plugin-label', $plugin_label);
}

// --plugin-id option
Expand Down

0 comments on commit 02726f5

Please sign in to comment.