1

I'm trying to retrieve the route node in a Symfony CMF controller.

My route was created like :

$route = new MultilangRoute();
$route->setDefault('_controller', 'AcmeMainBundle:Demo:news');
$dm->persist($route);

How can I get the MultilangRoute route object in my AcmeMainBundle:Demo:news action ?

manuquentin
  • 894
  • 1
  • 11
  • 19

1 Answers1

1

Ok I've found the solution with :

$request->attributes->get('_route')
manuquentin
  • 894
  • 1
  • 11
  • 19
  • 1
    the cmf router puts the route object into _route, instead of the route name like the core symfony router does. – dbu May 22 '13 at 09:18