5 * Contains \Drupal\Console\Command\Site\DebugCommand.
8 namespace Drupal\Console\Command\Multisite;
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\Command\Shared\CommandTrait;
14 use Drupal\Console\Core\Style\DrupalStyle;
17 * Class SiteDebugCommand
19 * @package Drupal\Console\Command\Site
21 class DebugCommand extends Command
28 * DebugCommand constructor.
32 public function __construct($appRoot)
34 $this->appRoot = $appRoot;
35 parent::__construct();
41 public function configure()
44 ->setName('multisite:debug')
45 ->setDescription($this->trans('commands.multisite.debug.description'))
46 ->setHelp($this->trans('commands.multisite.debug.help'));
53 protected function execute(InputInterface $input, OutputInterface $output)
55 $io = new DrupalStyle($input, $output);
59 $multiSiteFile = sprintf(
64 if (file_exists($multiSiteFile)) {
65 include $multiSiteFile;
70 $this->trans('commands.multisite.debug.messages.no-multisites')
77 $this->trans('commands.multisite.debug.messages.site-format')
81 $this->trans('commands.multisite.debug.messages.site'),
82 $this->trans('commands.multisite.debug.messages.directory'),
86 foreach ($sites as $site => $directory) {
89 $this->appRoot . '/sites/' . $directory
93 $io->table($tableHeader, $tableRows);