merged branch xavierlacot/master (PR #4680)
Commits -------e44e21c
Reverted to Symfony 2.0's signature, which made it simple to display only a subset of the routes of the application. This is particularly useful for FOSJsRoutingBundle's fos:js-routing:debug command, which allows to filter the list of javascript-exposed routes. Discussion ---------- Allow to pass a routes list to RouterDebugCommand::outputRoutes() I just reverted to Symfony 2.0's signature, which made it simple to display only a subset of the routes of the application. This is particularly useful for FOSJsRoutingBundle's fos:js-routing:debug command, which allows to filter the list of javascript-exposed routes. --------------------------------------------------------------------------- by travisbot at 2012-06-28T16:41:31Z This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1730923) (mergede44e21c2
into884a8264
). --------------------------------------------------------------------------- by willdurand at 2012-06-28T16:47:07Z 👍
This commit is contained in:
commit
be6319fed8
@ -74,11 +74,13 @@ EOF
|
||||
}
|
||||
}
|
||||
|
||||
protected function outputRoutes(OutputInterface $output)
|
||||
protected function outputRoutes(OutputInterface $output, $routes = null)
|
||||
{
|
||||
$routes = array();
|
||||
foreach ($this->getContainer()->get('router')->getRouteCollection()->all() as $name => $route) {
|
||||
$routes[$name] = $route->compile();
|
||||
if (null === $routes) {
|
||||
$routes = array();
|
||||
foreach ($this->getContainer()->get('router')->getRouteCollection()->all() as $name => $route) {
|
||||
$routes[$name] = $route->compile();
|
||||
}
|
||||
}
|
||||
|
||||
$output->writeln($this->getHelper('formatter')->formatSection('router', 'Current routes'));
|
||||
|
Reference in New Issue
Block a user