5 * Contains Drupal\Console\Core\Command\ChainCustomCommand.
8 namespace Drupal\Console\Core\Command\Chain;
10 use Symfony\Component\Console\Input\ArrayInput;
11 use Symfony\Component\Console\Input\InputInterface;
12 use Symfony\Component\Console\Input\InputOption;
13 use Symfony\Component\Console\Output\OutputInterface;
14 use Drupal\Console\Core\Command\Shared\InputTrait;
17 * Class ChainCustomCommand
19 * @package Drupal\Console\Core\Command\ChainCustomCommand
21 class ChainCustomCommand extends BaseCommand
33 protected $description;
41 * ChainCustomCommand constructor.
46 * @param $chainDiscovery
48 public function __construct(
55 $this->description = $description;
58 parent::__construct($chainDiscovery);
59 $this->ignoreValidationErrors();
64 InputOption::VALUE_OPTIONAL,
73 protected function configure()
76 ->setName($this->name)
77 ->setDescription($this->description);
83 protected function execute(InputInterface $input, OutputInterface $output)
85 $command = $this->getApplication()->find('chain');
89 '--file' => $this->file,
92 foreach ($input->getOptions() as $option => $value) {
94 $arguments['--' . $option] = $value;
98 $commandInput = new ArrayInput($arguments);
99 $commandInput->setInteractive(true);
101 return $command->run($commandInput, $output);