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

FlightForm   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 7

Importance

Changes 0
Metric Value
dl 0
loc 30
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 7

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 24 1
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
}