Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
15 / 15 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
AnalyseAvisType | |
100.00% |
15 / 15 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
buildForm | |
100.00% |
12 / 12 |
|
100.00% |
1 / 1 |
1 | |||
configureOptions | |
100.00% |
3 / 3 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace App\Domain\AIPD\Form\Type; |
6 | |
7 | use App\Domain\AIPD\Model\AnalyseImpact; |
8 | use Symfony\Component\Form\AbstractType; |
9 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; |
10 | use Symfony\Component\Form\FormBuilderInterface; |
11 | use Symfony\Component\OptionsResolver\OptionsResolver; |
12 | |
13 | class AnalyseAvisType extends AbstractType |
14 | { |
15 | public function buildForm(FormBuilderInterface $builder, array $options) |
16 | { |
17 | $builder |
18 | ->add('avisReferent', AnalyseSingleAvisType::class) |
19 | ->add('avisDpd', AnalyseSingleAvisType::class) |
20 | ->add('avisRepresentant', AnalyseSingleAvisType::class) |
21 | ->add('avisResponsable', AnalyseSingleAvisType::class) |
22 | ->add('saveDraft', SubmitType::class, [ |
23 | 'label' => 'global.action.draft', |
24 | 'attr' => [ |
25 | 'class' => 'btn btn-info', |
26 | ], |
27 | ]) |
28 | ; |
29 | } |
30 | |
31 | public function configureOptions(OptionsResolver $resolver) |
32 | { |
33 | $resolver->setDefaults([ |
34 | 'data_class' => AnalyseImpact::class, |
35 | ]); |
36 | } |
37 | } |