Completed
Push — feature/update_flight ( 289873 )
by Laurent
18:14
created

FlightForm::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 24

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 24
rs 9.536
c 0
b 0
f 0
1
<?php
2
/**
3
 *
4
 */
5
6
namespace flightlog\form;
7
8
/**
9
 * FlightForm class
10
 *
11
 * @author Laurent De Coninck <[email protected]>
12
 */
13
class FlightForm extends Form
14
{
15
    /**
16
     * @inheritDoc
17
     */
18
    public function __construct(\ValidatorInterface $validator, $baseObject)
19
    {
20
        parent::__construct('flight_form', FormInterface::METHOD_POST, []);
21
22
        $this->setValidator($validator)
23
            ->bind($baseObject);
24
25
        $this
26
            ->add(new Hidden('idBBC_vols'))
27
            ->add(new Input('lieuD'))
28
            ->add(new Input('lieuA'))
29
            ->add(new Select('BBC_ballons_idBBC_ballons'))
30
            ->add(new Number('nbrPax'))
31
            ->add(new InputTextarea('remarque'))
32
            ->add(new InputTextarea('incidents'))
33
            ->add(new InputTextarea('passengerNames'))
34
            ->add(new Select('fk_type'))
35
            ->add(new Select('fk_pilot'))
36
            ->add(new Select('fk_organisateur'))
37
            ->add(new Number('kilometers'))
38
            ->add(new Number('cost'))
39
            ->add(new Select('fk_receiver'))
40
            ->add(new InputTextarea('justif_kilometers'));
41
    }
42
}