Skip to content
Permalink
Browse files

[plugin:block] Change the option label to plugin-label (#3851)

  • Loading branch information...
harold20 authored and enzolutions committed May 14, 2019
1 parent c2c3efb commit 02726f5372e23929eca025751ba1987bc0a00291
Showing with 10 additions and 10 deletions.
  1. +10 −10 src/Command/Generate/PluginBlockCommand.php
@@ -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',
@@ -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');
@@ -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,
@@ -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

0 comments on commit 02726f5

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