<?php
namespace App\Form;
use App\DTO\AffichageGraphiqueDTO;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class AffichageGraphiqueType extends AbstractType {
public static $USAGE_LOGEMENT = 'logement';
public static $USAGE_TERTIAIRE = 'tertiaire';
public function buildForm(FormBuilderInterface $builder, array $options) {
$builder
->add('usage', ChoiceType::class, [
'placeholder' => 'Tous',
'choices' => ['logement' => 'logement', 'tertiaire' => 'tertiaire']
])
->add('zoneClimatique', ChoiceType::class, [
'placeholder' => 'Tous',
'choices' => ['H1' => 'H1', 'H2' => 'H2', 'H3' => 'H3']
])
->add('abscisse', ChoiceType::class, [
'choices' => ['Compacité' => 'compacite', 'Taux vitré' => 'tauxVitre', 'Compacité et Taux vitré' => 'compaciteVitre','Compacité, taux vitré et brassage' => 'compaciteVitreBrassage', '% d\'orientation sud' => 'orientationSud']
])
->add('ordonnee', ChoiceType::class, [
'choices' => ['BBIO chauffage' => 'bBioChauffage', 'BBIO eclairage' => 'bBioEclairage']
])
;
}
public function configureOptions(OptionsResolver $resolver) {
$resolver->setDefaults([
'data_class' => AffichageGraphiqueDTO::class,
]);
}
}