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
*/
{
$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')
);
}