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
20 * @package Drupal\Console\Core\Command\Chain
22 class ChainDebugCommand extends Command
29 protected $chainDiscovery;
32 * ChainDebugCommand constructor.
34 * @param ChainDiscovery $chainDiscovery
36 public function __construct(
37 ChainDiscovery $chainDiscovery
39 $this->chainDiscovery = $chainDiscovery;
41 parent::__construct();
47 protected function configure()
50 ->setName('chain:debug')
51 ->setDescription($this->trans('commands.chain.debug.description'));
57 protected function execute(InputInterface $input, OutputInterface $output)
59 $io = new DrupalStyle($input, $output);
60 $files = $this->chainDiscovery->getChainFiles();
62 foreach ($files as $directory => $chainFiles) {
63 $io->info($this->trans('commands.chain.debug.messages.directory'), false);
64 $io->comment($directory);
67 $this->trans('commands.chain.debug.messages.file')
71 foreach ($chainFiles as $file) {
75 $io->table($tableHeader, $tableRows);