1 | <?php |
||
23 | class ContactUpdateForm extends ContactForm |
||
24 | { |
||
25 | |||
26 | /** |
||
27 | * |
||
28 | * in this function you add all the fields you need for your Form. |
||
29 | * Form this you have to call add method on $this->formBuilder attribute : |
||
30 | * |
||
31 | * $this->formBuilder->add("name", "text") |
||
32 | * ->add("email", "email", array( |
||
33 | * "attr" => array( |
||
34 | * "class" => "field" |
||
35 | * ), |
||
36 | * "label" => "email", |
||
37 | * "constraints" => array( |
||
38 | * new \Symfony\Component\Validator\Constraints\NotBlank() |
||
39 | * ) |
||
40 | * ) |
||
41 | * ) |
||
42 | * ->add('age', 'integer'); |
||
43 | * |
||
44 | * @return null |
||
45 | */ |
||
46 | protected function buildForm() |
||
60 | |||
61 | public function getName() |
||
65 | } |
||
66 |