문제

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 ?

도움이 되었습니까?

해결책

Ok I've found the solution with :

$request->attributes->get('_route')
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top