X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrupal%2Fconsole%2Fsrc%2FCommand%2FGenerate%2FPluginRestResourceCommand.php;h=dfc7ce1eeadecd4d9b5db80b5afc755a556c1f8c;hp=aa187a23db4e155ca0e64ba170f4b40f46242a0d;hb=eba34333e3c89f208d2f72fa91351ad019a71583;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae diff --git a/vendor/drupal/console/src/Command/Generate/PluginRestResourceCommand.php b/vendor/drupal/console/src/Command/Generate/PluginRestResourceCommand.php index aa187a23d..dfc7ce1ee 100644 --- a/vendor/drupal/console/src/Command/Generate/PluginRestResourceCommand.php +++ b/vendor/drupal/console/src/Command/Generate/PluginRestResourceCommand.php @@ -83,10 +83,10 @@ class PluginRestResourceCommand extends Command ->setName('generate:plugin:rest:resource') ->setDescription($this->trans('commands.generate.plugin.rest.resource.description')) ->setHelp($this->trans('commands.generate.plugin.rest.resource.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.rest.resource.options.class') ) @@ -98,25 +98,25 @@ class PluginRestResourceCommand extends Command ) ->addOption( 'plugin-id', - '', + null, InputOption::VALUE_OPTIONAL, $this->trans('commands.generate.plugin.rest.resource.options.plugin-id') ) ->addOption( 'plugin-label', - '', + null, InputOption::VALUE_OPTIONAL, $this->trans('commands.generate.plugin.rest.resource.options.plugin-label') ) ->addOption( 'plugin-url', - '', + null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, $this->trans('commands.generate.plugin.rest.resource.options.plugin-url') ) ->addOption( 'plugin-states', - '', + null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, $this->trans('commands.generate.plugin.rest.resource.options.plugin-states') ); @@ -131,7 +131,7 @@ class PluginRestResourceCommand extends Command // @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration if (!$this->confirmGeneration($io)) { - return; + return 1; } $module = $input->getOption('module'); @@ -144,6 +144,8 @@ class PluginRestResourceCommand extends Command $this->generator->generate($module, $class_name, $plugin_label, $plugin_id, $plugin_url, $plugin_states); $this->chainQueue->addCommand('cache:rebuild', ['cache' => 'discovery']); + + return 0; } protected function interact(InputInterface $input, OutputInterface $output)