use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Command\Command;
-use Drupal\Console\Core\Command\Shared\CommandTrait;
-use Drupal\Console\Core\Style\DrupalStyle;
+/**
+ * Class AboutCommand
+ *
+ * @package Drupal\Console\Core\Command
+ */
class AboutCommand extends Command
{
- use CommandTrait;
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
- $io = new DrupalStyle($input, $output);
$application = $this->getApplication();
$aboutTitle = sprintf(
$application->getVersion()
);
- $io->setDecorated(false);
- $io->title($aboutTitle);
- $io->setDecorated(true);
+ $this->getIo()->setDecorated(false);
+ $this->getIo()->title($aboutTitle);
+ $this->getIo()->setDecorated(true);
$commands = [
'init' => [
$this->trans('commands.init.description'),
'drupal init'
],
- // 'quick-start' => [
- // $this->trans('commands.common.messages.quick-start'),
- // 'drupal quick:start'
- // ],
- // 'site-new' => [
- // $this->trans('commands.site.new.description'),
- // 'drupal site:new'
- // ],
+ 'quick-start' => [
+ $this->trans('commands.common.messages.quick-start'),
+ 'drupal quick:start'
+ ],
+ 'site-new' => [
+ $this->trans('commands.site.new.description'),
+ 'drupal site:new'
+ ],
'site-install' => [
$this->trans('commands.site.install.description'),
sprintf(
];
foreach ($commands as $command => $commandInfo) {
- $io->writeln($commandInfo[0]);
- $io->newLine();
- $io->comment(sprintf(' %s', $commandInfo[1]));
- $io->newLine();
+ $this->getIo()->writeln($commandInfo[0]);
+ $this->getIo()->comment(sprintf(' %s', $commandInfo[1]));
+ $this->getIo()->newLine();
}
- $io->setDecorated(false);
- $io->section($this->trans('commands.self-update.description'));
- $io->setDecorated(true);
- $io->comment(' drupal self-update');
- $io->newLine();
+ $this->getIo()->writeln($this->trans('commands.self-update.description'));
+ $this->getIo()->comment(' drupal self-update');
+ $this->getIo()->newLine();
}
}