X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrupal%2Fconsole%2Fsrc%2FCommand%2FFeatures%2FDebugCommand.php;fp=vendor%2Fdrupal%2Fconsole%2Fsrc%2FCommand%2FFeatures%2FDebugCommand.php;h=5c7b5f1c38375421e6c896e95c14bc7d88108a8b;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/vendor/drupal/console/src/Command/Features/DebugCommand.php b/vendor/drupal/console/src/Command/Features/DebugCommand.php new file mode 100644 index 000000000..5c7b5f1c3 --- /dev/null +++ b/vendor/drupal/console/src/Command/Features/DebugCommand.php @@ -0,0 +1,66 @@ +setName('features:debug') + ->setDescription($this->trans('commands.features.debug.description')) + ->addArgument( + 'bundle', + InputArgument::OPTIONAL, + $this->trans('commands.features.debug.arguments.bundle') + ); + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $io = new DrupalStyle($input, $output); + $bundle= $input->getArgument('bundle'); + + $tableHeader = [ + $this->trans('commands.features.debug.messages.bundle'), + $this->trans('commands.features.debug.messages.name'), + $this->trans('commands.features.debug.messages.machine_name'), + $this->trans('commands.features.debug.messages.status'), + $this->trans('commands.features.debug.messages.state'), + ]; + + $tableRows = []; + + $features = $this->getFeatureList($io, $bundle); + + foreach ($features as $feature) { + $tableRows[] = [$feature['bundle_name'],$feature['name'], $feature['machine_name'], $feature['status'],$feature['state']]; + } + + $io->table($tableHeader, $tableRows, 'compact'); + } +}