X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrupal%2Fconsole%2Fsrc%2FCommand%2FGenerate%2FPluginFieldFormatterCommand.php;h=e930070ef3f8fc098511cee6c3c8c9279417405b;hp=b0e94117c9ee171dc930022a6bf1be279f7c1700;hb=eba34333e3c89f208d2f72fa91351ad019a71583;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae diff --git a/vendor/drupal/console/src/Command/Generate/PluginFieldFormatterCommand.php b/vendor/drupal/console/src/Command/Generate/PluginFieldFormatterCommand.php index b0e94117c..e930070ef 100644 --- a/vendor/drupal/console/src/Command/Generate/PluginFieldFormatterCommand.php +++ b/vendor/drupal/console/src/Command/Generate/PluginFieldFormatterCommand.php @@ -88,28 +88,28 @@ class PluginFieldFormatterCommand extends Command ->setName('generate:plugin:fieldformatter') ->setDescription($this->trans('commands.generate.plugin.fieldformatter.description')) ->setHelp($this->trans('commands.generate.plugin.fieldformatter.help')) - ->addOption('module', '', InputOption::VALUE_REQUIRED, $this->trans('commands.common.options.module')) + ->addOption('module', null, InputOption::VALUE_REQUIRED, $this->trans('commands.common.options.module')) ->addOption( 'class', - '', + null, InputOption::VALUE_REQUIRED, $this->trans('commands.generate.plugin.fieldformatter.options.class') ) ->addOption( 'label', - '', + null, InputOption::VALUE_OPTIONAL, $this->trans('commands.generate.plugin.fieldformatter.options.label') ) ->addOption( 'plugin-id', - '', + null, InputOption::VALUE_OPTIONAL, $this->trans('commands.generate.plugin.fieldformatter.options.plugin-id') ) ->addOption( 'field-type', - '', + null, InputOption::VALUE_OPTIONAL, $this->trans('commands.generate.plugin.fieldformatter.options.field-type') ); @@ -124,7 +124,7 @@ class PluginFieldFormatterCommand extends Command // @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration if (!$this->confirmGeneration($io)) { - return; + return 1; } $module = $input->getOption('module'); @@ -136,6 +136,8 @@ class PluginFieldFormatterCommand extends Command $this->generator->generate($module, $class_name, $label, $plugin_id, $field_type); $this->chainQueue->addCommand('cache:rebuild', ['cache' => 'discovery']); + + return 0; } protected function interact(InputInterface $input, OutputInterface $output)