/** * @param FormBuilderInterface $builder * @param array $options */ public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->add('targets'); // $builder // ->get('targets') // ->addModelTransformer(new CallbackTransformer( // function() { // // }, function($fieldTargetIds) { // print_r($fieldTargetIds); //// //// $qb = $this->entityManager->createQueryBuilder(); //// $qb->select('fieldTarget'); //// $qb->from('CboujonPropertyBundle:FieldTarget', 'fieldTarget'); //// $qb->where($qb->expr()->in('fieldTarget.id', $fieldTargetIds)); // // //ArrayCollection // $fieldTargets = $qb->getQuery(); // print_r($fieldTargets); // return $fieldTargets; // })); }
public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); }
/** * @param FormBuilderInterface $builder * @param array $options */ public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->add('numberOfRooms')->add('numberOfBathrooms'); }