->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')
);
// @see use Drupal\Console\Command\Shared\ConfirmationTrait::confirmGeneration
if (!$this->confirmGeneration($io)) {
- return;
+ return 1;
}
$module = $input->getOption('module');
$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)