5 * Contains \Drupal\Console\Command\Features\DebugCommand.
8 namespace Drupal\Console\Command\Features;
10 use Symfony\Component\Console\Input\InputArgument;
11 use Symfony\Component\Console\Input\InputInterface;
12 use Symfony\Component\Console\Output\OutputInterface;
13 use Drupal\Console\Command\Shared\FeatureTrait;
14 use Drupal\Console\Core\Command\Shared\CommandTrait;
15 use Drupal\Console\Core\Style\DrupalStyle;
16 use Drupal\Console\Annotations\DrupalCommand;
17 use Symfony\Component\Console\Command\Command;
21 * extension = "features",
22 * extensionType = "module"
26 class DebugCommand extends Command
31 protected function configure()
34 ->setName('features:debug')
35 ->setDescription($this->trans('commands.features.debug.description'))
38 InputArgument::OPTIONAL,
39 $this->trans('commands.features.debug.arguments.bundle')
43 protected function execute(InputInterface $input, OutputInterface $output)
45 $io = new DrupalStyle($input, $output);
46 $bundle= $input->getArgument('bundle');
49 $this->trans('commands.features.debug.messages.bundle'),
50 $this->trans('commands.features.debug.messages.name'),
51 $this->trans('commands.features.debug.messages.machine_name'),
52 $this->trans('commands.features.debug.messages.status'),
53 $this->trans('commands.features.debug.messages.state'),
58 $features = $this->getFeatureList($io, $bundle);
60 foreach ($features as $feature) {
61 $tableRows[] = [$feature['bundle_name'],$feature['name'], $feature['machine_name'], $feature['status'],$feature['state']];
64 $io->table($tableHeader, $tableRows, 'compact');