tengo estos formularios
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use AppBundle\Form\CursoMatriculaType;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use AppBundle\Repository\CursoMatriculaRepository;
use AppBundle\Entity\CursoMatricula;
class PackMatriculaType extends AbstractType {
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('packcursos',
CollectionType::class,
array (
'label' => 'Cursos del pack',
'entry_type' => CursoMatriculaType::class,
'allow_delete' => true,
'allow_add' => true,
'by_reference' => true,
'entry_options' =>
array(
'label'=> false
)
)
);
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'AppBundle\Entity\PackMatricula'
));
}
/**
* {@inheritdoc}
*/
public function getBlockPrefix()
{
return 'appbundle_packmatricula';
}
}
y
namespace AppBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use AppBundle\Repository\CursoMatriculaRepository;
use AppBundle\Entity\CursoMatricula;
class CursoMatriculaType extends AbstractType {
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('nombre')
->add('modalidad')
->add('tipo');
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'AppBundle\Entity\CursoMatricula'
));
}
public function getBlockPrefix()
{
return 'appbundle_cursomatricula';
}
}
Y resulta que al hacer el render con el bundle de Easyadmin así:
- { property: 'packs', label: 'Packs', type: 'collection', type_options: { entry_type: 'AppBundle\Form\PackMatriculaType', by_reference: false, allow_delete: true , allow_add: true, entry_options: {label: false}} }
Me funciona correctamente en entorno proc, pero no se porque me desaparece el web profiler cuando estoy en entorno dev.
Me desaparece el token dandome un error 404. Y me sale un conexion reset que veo dando al F12 del explorador. ALguna idea de porque puede ser. Tiene que ver algo con el X-debug??