Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

Commit 0d5a77e

Browse files
KrzysztofMoskalikKrzysztof Moskalik
authored andcommitted
Updated documentation
1 parent ae5f567 commit 0d5a77e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,33 @@ you to pass any additional informations you want in optional
105105
which defines order of execution (default is `0`, if two or more
106106
services have same priority then first added is executed first).
107107

108+
Embed Forms
109+
-----------
110+
111+
FormGenerator will build also forms for nested models:
112+
113+
``` php
114+
/*
115+
* @Form\Embed(
116+
* class = "Codete\FormGeneratorBundle\Tests\Model\Person",
117+
* )
118+
*/
119+
public $person;
120+
```
121+
122+
This will build form from all nested model properties,
123+
but we can specify which view we want to use:
124+
125+
``` php
126+
/*
127+
* @Form\Embed(
128+
* class = "Codete\FormGeneratorBundle\Tests\Model\Person",
129+
* view = "work"
130+
* )
131+
*/
132+
public $employee;
133+
```
134+
108135
FormViewProvider
109136
----------------
110137

0 commit comments

Comments
 (0)