5 * Contains \Drupal\Console\Core\Command\Chain\ChainDebugCommand.
8 namespace Drupal\Console\Core\Command\Chain;
10 use Symfony\Component\Console\Input\InputInterface;
11 use Symfony\Component\Console\Output\OutputInterface;
12 use Symfony\Component\Console\Command\Command;
13 use Drupal\Console\Core\Utils\ChainDiscovery;
14 use Drupal\Console\Core\Style\DrupalStyle;
15 use Drupal\Console\Core\Command\Shared\CommandTrait;
18 * Class ChainDebugCommand
19 * @package Drupal\Console\Core\Command\Chain
21 class ChainDebugCommand extends Command
28 protected $chainDiscovery;
31 * ChainDebugCommand constructor.
33 * @param ChainDiscovery $chainDiscovery
35 public function __construct(
36 ChainDiscovery $chainDiscovery
38 $this->chainDiscovery = $chainDiscovery;
40 parent::__construct();
46 protected function configure()
49 ->setName('chain:debug')
50 ->setDescription($this->trans('commands.chain.debug.description'));
56 protected function execute(InputInterface $input, OutputInterface $output)
58 $io = new DrupalStyle($input, $output);
59 $files = $this->chainDiscovery->getChainFiles();
61 foreach ($files as $directory => $chainFiles) {
62 $io->info($this->trans('commands.chain.debug.messages.directory'), false);
63 $io->comment($directory);
66 $this->trans('commands.chain.debug.messages.file')
70 foreach ($chainFiles as $file) {
74 $io->table($tableHeader, $tableRows);