Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/12/2013, 12:17
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: Cómo usar url con parámetros GET tradicional en Symfony 2

Pues solamente crea tu ruta /test, y pasa el objeto request como primer parámetro a tu acción, y de ahí jalas los valores, ej:

routing.yml
Código:
test:
  path: /test
  defaults:
    _controller: MiBundle:TestController:test
Código PHP:
Ver original
  1. public function testAction(Request $request) {
  2.        $foo = $request->get('foo');
  3. }

Saludos.