forked from hechoendrupal/drupal-console
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRouterRebuildCommand.php
More file actions
31 lines (26 loc) · 968 Bytes
/
Copy pathRouterRebuildCommand.php
File metadata and controls
31 lines (26 loc) · 968 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* @file
* Contains \Drupal\AppConsole\Command\RouterRebuildCommand.
*/
namespace Drupal\AppConsole\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class RouterRebuildCommand extends ContainerAwareCommand
{
protected function configure()
{
$this
->setName('router:rebuild')
->setDescription($this->trans('commands.router.rebuild.description'));
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$output->writeln('');
$output->writeln('[+] <comment>' . $this->trans('commands.router.rebuild.messages.rebuilding') . '</comment>');
$container = $this->getContainer();
$router_builder = $container->get('router.builder');
$router_builder->rebuild();
$output->writeln('[+] <info>' . $this->trans('commands.router.rebuild.messages.completed') . '</info>');
}
}