public function onConsoleCommand(ConsoleCommandEvent $event)
{
$command = $event->getCommand();
if ($command instanceof HelpCommand) {
$command = $this->getCommandFromHelpCommand($command);
}
if (!$command instanceof FormBasedCommand) {
return;
}
$inputDefinition = $this->inputDefinitionFactory->createForFormType($command->formType());
$this->setInputDefinition($command, $event->getInput(), $inputDefinition);
}