CommandeLegumesType.php 913 Bytes
Newer Older
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
<?php

namespace PotageBundle\Form\Membre;

use PotageBundle\Entity\CommandeLegumes;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class CommandeLegumesType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('prixUnitaire')
            ->add('unite')
            ->add('quantite')
            ->add('prix')
        ;
    }
    
    public function configureOptions(OptionsResolver $resolver)
    {
        parent::configureOptions($resolver);
        $resolver->setDefault('data_class', CommandeLegumes::class);
        $resolver->setDefault('attr', array(
            'class' => 'formulaire formulaire_commande',
        ));
    }
    
    public function getBlockPrefix()
    {
        return 'commande_legumes';
    }
}