| 1 | <?php |
||
| 13 | trait FormAware |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var FormFactory |
||
| 17 | */ |
||
| 18 | protected $formFactory; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @return FormFactory |
||
| 22 | */ |
||
| 23 | public function getFormFactory() |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param FormFactory $formFactory |
||
| 30 | */ |
||
| 31 | public function setFormFactory(FormFactory $formFactory) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Creates and returns a Form instance from the type of the form. |
||
| 38 | * |
||
| 39 | * @param string|FormTypeInterface $type The built type of the form |
||
| 40 | * @param mixed $data The initial data for the form |
||
| 41 | * @param array $options Options for the form |
||
| 42 | * |
||
| 43 | * @return Form |
||
| 44 | */ |
||
| 45 | public function createForm($type, $data = null, array $options = []) |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Creates and returns a form builder instance. |
||
| 52 | * |
||
| 53 | * @param mixed $data The initial data for the form |
||
| 54 | * @param array $options Options for the form |
||
| 55 | * |
||
| 56 | * @return FormBuilderInterface |
||
| 57 | */ |
||
| 58 | public function createFormBuilder($data = null, array $options = []) |
||
| 62 | } |
||
| 63 |