How to get current route in Symfony 2?
From something that is ContainerAware (like a controller):
$request = $this->container->get('request');$routeName = $request->get('_route');
I think this is the easiest way to do this:
class MyController extends Controller{ public function myAction($_route) { var_dump($_route); } .....