X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrupal%2Fconsole%2Fsrc%2FCommand%2FGenerate%2FFormAlterCommand.php;h=71c5d8cfd3716439576826c8febc6a802330d3f1;hp=f838827f62ef89b2adaad92243e3d08c81183ef6;hb=eba34333e3c89f208d2f72fa91351ad019a71583;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae diff --git a/vendor/drupal/console/src/Command/Generate/FormAlterCommand.php b/vendor/drupal/console/src/Command/Generate/FormAlterCommand.php index f838827f6..71c5d8cfd 100644 --- a/vendor/drupal/console/src/Command/Generate/FormAlterCommand.php +++ b/vendor/drupal/console/src/Command/Generate/FormAlterCommand.php @@ -138,19 +138,19 @@ class FormAlterCommand extends Command ->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') ); @@ -165,7 +165,7 @@ class FormAlterCommand extends Command // @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration if (!$this->confirmGeneration($io)) { - return; + return 1; } $module = $input->getOption('module'); @@ -193,6 +193,8 @@ class FormAlterCommand extends Command ->generate($module, $formId, $inputs, $this->metadata); $this->chainQueue->addCommand('cache:rebuild', ['cache' => 'discovery']); + + return 0; } protected function interact(InputInterface $input, OutputInterface $output)