1 | <?php |
||
18 | abstract class GenericFormElement extends AbstractElement implements FormElement |
||
19 | { |
||
20 | /** |
||
21 | * @var \Symfony\Component\Form\FormFactoryInterface |
||
22 | */ |
||
23 | protected $formFactory; |
||
24 | |||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | */ |
||
28 | public function getRoute() |
||
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | public function setDefaultOptions(OptionsResolver $resolver) |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function configureOptions(OptionsResolver $resolver) |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | public function setFormFactory(FormFactoryInterface $factory) |
||
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | public function createForm($data = null) |
||
76 | |||
77 | /** |
||
78 | * {@inheritdoc} |
||
79 | */ |
||
80 | public function getSuccessRoute() |
||
84 | |||
85 | /** |
||
86 | * {@inheritdoc} |
||
87 | */ |
||
88 | public function getSuccessRouteParameters() |
||
92 | |||
93 | /** |
||
94 | * Initialize create Form. This form will be used in createAction in FormController. |
||
95 | * |
||
96 | * @param \Symfony\Component\Form\FormFactoryInterface $factory |
||
97 | * @param mixed $data |
||
98 | * @return \Symfony\Component\Form\FormInterface |
||
99 | */ |
||
100 | abstract protected function initForm(FormFactoryInterface $factory, $data = null); |
||
101 | } |
||
102 |