Security update for Core, with self-updated composer
[yaffs-website] / vendor / drupal / console / src / Command / Router / RebuildCommand.php
index 1bbf202683f56929b94fc4c24bc5ef4aa39a370e..8fd4a197c1f7121ad046263081b42ea3b4204d4f 100644 (file)
@@ -9,15 +9,11 @@ namespace Drupal\Console\Command\Router;
 
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Command\Command;
+use Drupal\Console\Core\Command\Command;
 use Drupal\Core\Routing\RouteBuilderInterface;
-use Drupal\Console\Core\Command\Shared\CommandTrait;
-use Drupal\Console\Core\Style\DrupalStyle;
 
 class RebuildCommand extends Command
 {
-    use CommandTrait;
-
     /**
      * @var RouteBuilderInterface
      */
@@ -38,21 +34,20 @@ class RebuildCommand extends Command
     {
         $this
             ->setName('router:rebuild')
-            ->setDescription($this->trans('commands.router.rebuild.description'));
+            ->setDescription($this->trans('commands.router.rebuild.description'))
+            ->setAliases(['rr']);
     }
 
     protected function execute(InputInterface $input, OutputInterface $output)
     {
-        $io = new DrupalStyle($input, $output);
-
-        $io->newLine();
-        $io->comment(
+        $this->getIo()->newLine();
+        $this->getIo()->comment(
             $this->trans('commands.router.rebuild.messages.rebuilding')
         );
 
         $this->routerBuilder->rebuild();
 
-        $io->success(
+        $this->getIo()->success(
             $this->trans('commands.router.rebuild.messages.completed')
         );
     }