Frage

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 ?

War es hilfreich?

Lösung

Ok I've found the solution with :

$request->attributes->get('_route')
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top