1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
| <?php
namespace App\Form;
use App\Entity\Commande;
use App\Entity\Couleur;
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\FileType;
use Symfony\Component\Form\Extension\Core\Type\RadioType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class CommandeType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('idClient')
->add('saisiPar')
->add('Ville')
->add('cimetiere')
->add('emplacementDivision')
->add('rang')
->add('caser')
->add('numeroCons')
->add('sansDivision')
->add('nomDuDefunt')
->add('gravures')
->add('joindreDemandeTravaux', FileType::class, ['label' => 'Demande travaux PDF'
,'data_class' => null])//array('data_class' => null,'required' => false, 'label_attr' => 'custom-file-input', 'attr' => 'inputGroupFile01', 'label' => 'joindreDemande'))
->add('joindreImage', FileType::class, ['label' => 'Joindre image PDF'
,'data_class' => null])//array('data_class' => null,'required' => false, 'label' => 'joindreImage'))
//array('data_class' => null,'required' => false,
->add('OR', CheckboxType::class)
->add('Peinture')
->add('emplacementGravure')
->add('toutesLesLettres', CheckboxType::class)
->add('partielle', CheckboxType::class)
->add('motif')
// ->add('dateCommande')
->add('autrePrecisez')
->add('autreCouleurPrecisez', entityType::Class, [
'class' => Couleur::class,
'choice_label' => 'nomCouleur',
'choice_value' => 'id',
'multiple' => 'false',
])
->add('detailCommande')
->add('detailTravaux')
;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => Commande::class,
]);
}
} |
Partager