<?php
namespace App\Form\Billing;
use App\Entity\CancelReason;
use App\Entity\Client;
use App\Entity\Company;
use App\Entity\Contract;
use App\Entity\Intervenant;
use App\Entity\Product;
use App\Entity\RDV;
use App\Entity\RDVProduct;
use App\Entity\Salon;
use App\Entity\Site;
use Doctrine\ORM\EntityRepository;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class SendType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('start', TextType::class, [
'label' => 'Choisir une date de début',
'required' => true,
'attr' => [
'placeholder' => 'Choisir une date de début',
],
'label_attr' => array('class' => ''),
])
->add('end', TextType::class, [
'label' => 'Choisir une date de fin',
'required' => true,
'attr' => [
'placeholder' => 'Choisir une date de fin',
],
'label_attr' => array('class' => ''),
])
->add('modeEnvoi', ChoiceType::class, [
'label' => 'Choisir un mode envoi',
'choices'=> [
'Par mail' => 'mail',
'Par courrier' => 'courrier',
],
'attr' => [
'placeholder' => 'Choisir un mode d\'envoi',
],
'label_attr' => array('class' => ''),
])
->add('site', EntityType::class, [
'label' => 'Choisir un site',
'class' => Site::class,
'placeholder' => 'Choisir un site',
'attr' => [
'placeholder' => 'Choisir un site',
],
'label_attr' => array('class' => ''),
'required' => false
])
->add('company', EntityType::class, [
'label' => 'Société emettrice des factures',
'class' => Company::class,
'placeholder' => 'Choisir une société',
'attr' => [
'placeholder' => 'Choisir une société',
],
'label_attr' => array('class' => ''),
'required' => false
])
;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
]);
}
}