Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/07/2012, 10:16
Avatar de verinchi
verinchi
 
Fecha de Ingreso: septiembre-2004
Ubicación: Buenos Aires
Mensajes: 647
Antigüedad: 19 años, 7 meses
Puntos: 2
Pregunta Problemas con Build Form en Symfony 2

Buenas gente!
Aquí nuevamente luchando con Symfony 2.
Les comento que he intentado (fallidamente) utilizar BuildForm para una de mis entidades y me dio el siguiente error:
Fatal error: Declaration of Relof\testBundle\Form\TestType::buildForm() must be compatible with that of Symfony\Component\Form\FormTypeInterface::buildFor m() in C:\xampp\htdocs\Symfony\src\Relof\testBundle\Form\ testType.php on line 6

El contenido del testType es:
<?php
namespace Relof\testBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;
class TestType extends AbstractType
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder->add('campo1')
->add('campofecha')
->add('campoentero');
}
public function getName()
{
return 'test_form';
}
}

Obviamente, se trata de una prueba porque recién estoy empezando con esto.

Alguien tiene una idea de lo que puedo estar haciendo mal?

Desde ya, mil gracias!
__________________
Why can't we not be sober?
www.partitorium.com.ar