<?php
namespace App\MDS\GreenPatioBundle\Form;
use App\MDS\GreenPatioBundle\Entity\ReservationPaymentsClient;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
class ReservationPaymentsClientType extends AbstractType
{
/**
* {@inheritdoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('amount', TextType::class)
->add('datePayAt', DateType::class, array(
'widget' => 'single_text',
'format' => 'yyyy-MM-dd',
))
->add('wayToPay', ChoiceType::class, array(
'choices' => array(
'TRANSFERENCIA' => 'TRANSFERENCIA',
'VISA' => 'VISA',
'AMEX' => 'AMEX',
'CHEQUE' => 'CHEQUE',
'EFECTIVO' => 'EFECTIVO',
), 'placeholder' => 'Select a Way to pay'))
->add('reservationId', TextType::class)
// ->add('reservationId', EntityType::class, array(
// 'required' => true,
// 'class' => Reservation::class,
// 'choice_label' => 'title',
// 'choice_value' => 'id',
// 'expanded' => false,
// 'multiple' => false,
// 'placeholder' => 'Select a reservation'))
// ->add('createdAt')
// ->add('createdId')
// ->add('updatedAt')
// ->add('updatedId')
// ->add('proformaId')
// ->add('invoiceId')
->add('save', SubmitType::class);
}
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'data_class' => ReservationPaymentsClient::class
));
}
/**
* {@inheritdoc}
*/
public function getBlockPrefix()
{
return 'mds_greenpatiobundle_reservationpaymentsclient';
}
}