File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -217,21 +217,9 @@ public function postSubmit(FormEvent $event)
217
217
{
218
218
$ form = $ event ->getForm ();
219
219
$ data = $ form ->getParent ()->getData ();
220
-
221
- $ current = $ form ;
222
- $ isAllValid = true ;
223
-
224
- // check recuresively this form and all it's parents
225
- do {
226
- if (!$ current ->isValid ()) {
227
- $ isAllValid = false ;
228
- break ;
229
- }
230
- $ current = $ current ->getParent ();
231
- } while (null !== $ current );
232
-
220
+
233
221
$ getter = 'get ' .ucfirst ($ this ->propertyName );
234
- if (!$ isAllValid && $ data ->$ getter () instanceof ArrayCollection) {
222
+ if (!$ form -> isValid () && $ data ->$ getter () instanceof ArrayCollection) {
235
223
// remove files absent in the original collection
236
224
$ data ->$ getter ()->clear ();
237
225
You can’t perform that action at this time.
0 commit comments