X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrupal%2Fconsole%2Fsrc%2FCommand%2FGenerate%2FPluginFieldTypeCommand.php;h=5f33c3d7a89d0bfe972c6c36fa53f862524704fb;hp=d60c4bcb5513d9b847c4ab8512c7f4a03f7735a7;hb=eba34333e3c89f208d2f72fa91351ad019a71583;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae diff --git a/vendor/drupal/console/src/Command/Generate/PluginFieldTypeCommand.php b/vendor/drupal/console/src/Command/Generate/PluginFieldTypeCommand.php index d60c4bcb5..5f33c3d7a 100644 --- a/vendor/drupal/console/src/Command/Generate/PluginFieldTypeCommand.php +++ b/vendor/drupal/console/src/Command/Generate/PluginFieldTypeCommand.php @@ -80,40 +80,40 @@ class PluginFieldTypeCommand extends Command ->setName('generate:plugin:fieldtype') ->setDescription($this->trans('commands.generate.plugin.fieldtype.description')) ->setHelp($this->trans('commands.generate.plugin.fieldtype.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.fieldtype.options.class') ) ->addOption( 'label', - '', + null, InputOption::VALUE_OPTIONAL, $this->trans('commands.generate.plugin.fieldtype.options.label') ) ->addOption( 'plugin-id', - '', + null, InputOption::VALUE_OPTIONAL, $this->trans('commands.generate.plugin.fieldtype.options.plugin-id') ) ->addOption( 'description', - '', + null, InputOption::VALUE_OPTIONAL, $this->trans('commands.generate.plugin.fieldtype.options.description') ) ->addOption( 'default-widget', - '', + null, InputOption::VALUE_OPTIONAL, $this->trans('commands.generate.plugin.fieldtype.options.default-widget') ) ->addOption( 'default-formatter', - '', + null, InputOption::VALUE_OPTIONAL, $this->trans('commands.generate.plugin.fieldtype.options.default-formatter') ); @@ -128,7 +128,7 @@ class PluginFieldTypeCommand extends Command // @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration if (!$this->confirmGeneration($io)) { - return; + return 1; } $module = $input->getOption('module'); @@ -143,6 +143,8 @@ class PluginFieldTypeCommand extends Command ->generate($module, $class_name, $label, $plugin_id, $description, $default_widget, $default_formatter); $this->chainQueue->addCommand('cache:rebuild', ['cache' => 'discovery'], false); + + return 0; } protected function interact(InputInterface $input, OutputInterface $output)