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; } }