->setHelp($this->trans('commands.generate.plugin.skeleton.help'))
->addOption(
'module',
- '',
+ null,
InputOption::VALUE_REQUIRED,
$this->trans('commands.common.options.module')
)
->addOption(
'plugin-id',
- '',
+ null,
InputOption::VALUE_REQUIRED,
$this->trans('commands.generate.plugin.options.plugin-id')
)
->addOption(
'class',
- '',
+ null,
InputOption::VALUE_OPTIONAL,
$this->trans('commands.generate.plugin.block.options.class')
)
->addOption(
'services',
- '',
+ null,
InputOption::VALUE_OPTIONAL| InputOption::VALUE_IS_ARRAY,
$this->trans('commands.common.options.services')
);
// @see use Drupal\Console\Command\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration($io)) {
- return;
+ return 1;
}
$module = $input->getOption('module');
$this->generator->generate($module, $pluginId, $plugin, $className, $pluginMetaData, $buildServices);
$this->chainQueue->addCommand('cache:rebuild', ['cache' => 'discovery']);
+
+ return 0;
}
protected function interact(InputInterface $input, OutputInterface $output)