X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrupal%2Fconsole-core%2Fsrc%2FCommand%2FChain%2FChainDebugCommand.php;fp=vendor%2Fdrupal%2Fconsole-core%2Fsrc%2FCommand%2FChain%2FChainDebugCommand.php;h=d5936707f0267055df5ce8ad0e36334ca9fb0a6f;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/vendor/drupal/console-core/src/Command/Chain/ChainDebugCommand.php b/vendor/drupal/console-core/src/Command/Chain/ChainDebugCommand.php new file mode 100644 index 000000000..d5936707f --- /dev/null +++ b/vendor/drupal/console-core/src/Command/Chain/ChainDebugCommand.php @@ -0,0 +1,79 @@ +chainDiscovery = $chainDiscovery; + + parent::__construct(); + } + + /** + * {@inheritdoc} + */ + protected function configure() + { + $this + ->setName('chain:debug') + ->setDescription($this->trans('commands.chain.debug.description')); + } + + /** + * {@inheritdoc} + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new DrupalStyle($input, $output); + $files = $this->chainDiscovery->getChainFiles(); + + foreach ($files as $directory => $chainFiles) { + $io->info($this->trans('commands.chain.debug.messages.directory'), false); + $io->comment($directory); + + $tableHeader = [ + $this->trans('commands.chain.debug.messages.file') + ]; + + $tableRows = []; + foreach ($chainFiles as $file) { + $tableRows[] = $file; + } + + $io->table($tableHeader, $tableRows); + } + + return 0; + } +}