->setHelp($this->trans('commands.generate.form.alter.help'))
->addOption(
'module',
- '',
+ null,
InputOption::VALUE_REQUIRED,
$this->trans('commands.common.options.module')
)
->addOption(
'form-id',
- '',
+ null,
InputOption::VALUE_OPTIONAL,
$this->trans('commands.generate.form.alter.options.form-id')
)
->addOption(
'inputs',
- '',
+ null,
InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY,
$this->trans('commands.common.options.inputs')
);
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration($io)) {
- return;
+ return 1;
}
$module = $input->getOption('module');
->generate($module, $formId, $inputs, $this->metadata);
$this->chainQueue->addCommand('cache:rebuild', ['cache' => 'discovery']);
+
+ return 0;
}
protected function interact(InputInterface $input, OutputInterface $output)