X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrupal%2Fconsole%2Fsrc%2FCommand%2FGenerate%2FPluginRulesActionCommand.php;h=43785e3d5b0f480c23c1c953b8edb2c393e97358;hp=4163e51ad1934fce8aa2b6c767720a2e7f6e9f17;hb=eba34333e3c89f208d2f72fa91351ad019a71583;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae diff --git a/vendor/drupal/console/src/Command/Generate/PluginRulesActionCommand.php b/vendor/drupal/console/src/Command/Generate/PluginRulesActionCommand.php index 4163e51ad..43785e3d5 100644 --- a/vendor/drupal/console/src/Command/Generate/PluginRulesActionCommand.php +++ b/vendor/drupal/console/src/Command/Generate/PluginRulesActionCommand.php @@ -83,35 +83,35 @@ class PluginRulesActionCommand extends Command ->setName('generate:plugin:rulesaction') ->setDescription($this->trans('commands.generate.plugin.rulesaction.description')) ->setHelp($this->trans('commands.generate.plugin.rulesaction.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_OPTIONAL, $this->trans('commands.generate.plugin.rulesaction.options.class') ) ->addOption( 'label', - '', + null, InputOption::VALUE_OPTIONAL, $this->trans('commands.generate.plugin.rulesaction.options.label') ) ->addOption( 'plugin-id', - '', + null, InputOption::VALUE_OPTIONAL, $this->trans('commands.generate.plugin.rulesaction.options.plugin-id') ) - ->addOption('type', '', InputOption::VALUE_REQUIRED, $this->trans('commands.generate.plugin.rulesaction.options.type')) + ->addOption('type', null, InputOption::VALUE_REQUIRED, $this->trans('commands.generate.plugin.rulesaction.options.type')) ->addOption( 'category', - '', + null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, $this->trans('commands.generate.plugin.rulesaction.options.category') ) ->addOption( 'context', - '', + null, InputOption::VALUE_OPTIONAL, $this->trans('commands.generate.plugin.rulesaction.options.context') ); @@ -126,7 +126,7 @@ class PluginRulesActionCommand extends Command // @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration if (!$this->confirmGeneration($io)) { - return; + return 1; } $module = $input->getOption('module'); @@ -140,6 +140,8 @@ class PluginRulesActionCommand extends Command $this->generator->generate($module, $class_name, $label, $plugin_id, $category, $context, $type); $this->chainQueue->addCommand('cache:rebuild', ['cache' => 'discovery']); + + return 0; } protected function interact(InputInterface $input, OutputInterface $output)