Well, I have the following data in a symfony form:
->add('lugar', EntityType::class, array(
'class' => 'AppBundle\Entity\Lugar',
'mapped' => false,
'query_builder' => function (EntityRepository $er) {
return $er->createQueryBuilder('e')
->orderBy('e.horaInicio', 'ASC');
},
'choice_label' => 'lugar',
'label' => 'Desea acudir a las siguientes horas? (15:45-17:00)'
))
Currently this code shows me all the hours that there are in horaInicio
, I would like to know if there is any way to catch only the ones I show in the code, with a if
or some method like that.