src/MDS/GreenPatioBundle/Form/ReservationPaymentsClientType.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\MDS\GreenPatioBundle\Form;
  3. use App\MDS\GreenPatioBundle\Entity\ReservationPaymentsClient;
  4. use Symfony\Component\Form\AbstractType;
  5. use Symfony\Component\Form\FormBuilderInterface;
  6. use Symfony\Component\OptionsResolver\OptionsResolver;
  7. use Symfony\Component\Form\Extension\Core\Type\SubmitType;
  8. use Symfony\Component\Form\Extension\Core\Type\TextType;
  9. use Symfony\Component\Form\Extension\Core\Type\DateType;
  10. use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
  11. use Symfony\Bridge\Doctrine\Form\Type\EntityType;
  12. class ReservationPaymentsClientType extends AbstractType
  13. {
  14.     /**
  15.      * {@inheritdoc}
  16.      */
  17.     public function buildForm(FormBuilderInterface $builder, array $options)
  18.     {
  19.         $builder
  20.             ->add('amount'TextType::class)
  21.             ->add('datePayAt'DateType::class, array(
  22.                 'widget' => 'single_text',
  23.                 'format' => 'yyyy-MM-dd',
  24.             ))
  25.             ->add('wayToPay'ChoiceType::class, array(
  26.                 'choices' => array(
  27.                     'TRANSFERENCIA' => 'TRANSFERENCIA',
  28.                     'VISA' => 'VISA',
  29.                     'AMEX' => 'AMEX',
  30.                     'CHEQUE' => 'CHEQUE',
  31.                     'EFECTIVO' => 'EFECTIVO',
  32.                 ), 'placeholder' => 'Select a Way to pay'))
  33.             ->add('reservationId'TextType::class)
  34. //            ->add('reservationId', EntityType::class, array(
  35. //                'required' => true,
  36. //                'class' => Reservation::class,
  37. //                'choice_label' => 'title',
  38. //                'choice_value' => 'id',
  39. //                'expanded' => false,
  40. //                'multiple' => false,
  41. //                'placeholder' => 'Select a reservation'))
  42. //            ->add('createdAt')
  43. //            ->add('createdId')
  44. //            ->add('updatedAt')
  45. //            ->add('updatedId')
  46. //            ->add('proformaId')
  47. //            ->add('invoiceId')
  48.             ->add('save'SubmitType::class);
  49.     }
  50.     
  51.     /**
  52.      * {@inheritdoc}
  53.      */
  54.     public function configureOptions(OptionsResolver $resolver)
  55.     {
  56.         $resolver->setDefaults(array(
  57.             'data_class' => ReservationPaymentsClient::class
  58.         ));
  59.     }
  60.     /**
  61.      * {@inheritdoc}
  62.      */
  63.     public function getBlockPrefix()
  64.     {
  65.         return 'mds_greenpatiobundle_reservationpaymentsclient';
  66.     }
  67. }